mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-622abed99ba83445/out/
cubepilot.rs

1#![doc = "MAVLink cubepilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Generalized UAVCAN node health"]
4409pub enum UavcanNodeHealth {
4410    #[doc = "The node is functioning properly."]
4411    UAVCAN_NODE_HEALTH_OK = 0,
4412    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4413    UAVCAN_NODE_HEALTH_WARNING = 1,
4414    #[doc = "The node has encountered a major failure."]
4415    UAVCAN_NODE_HEALTH_ERROR = 2,
4416    #[doc = "The node has suffered a fatal malfunction."]
4417    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4418}
4419impl UavcanNodeHealth {
4420    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4421}
4422impl Default for UavcanNodeHealth {
4423    fn default() -> Self {
4424        Self::DEFAULT
4425    }
4426}
4427#[cfg_attr(feature = "ts", derive(TS))]
4428#[cfg_attr(feature = "ts", ts(export))]
4429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4431#[cfg_attr(feature = "serde", serde(tag = "type"))]
4432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4433#[repr(u32)]
4434#[doc = "Generalized UAVCAN node mode"]
4435pub enum UavcanNodeMode {
4436    #[doc = "The node is performing its primary functions."]
4437    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4438    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4439    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4440    #[doc = "The node is under maintenance."]
4441    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4442    #[doc = "The node is in the process of updating its software."]
4443    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4444    #[doc = "The node is no longer available online."]
4445    UAVCAN_NODE_MODE_OFFLINE = 7,
4446}
4447impl UavcanNodeMode {
4448    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4449}
4450impl Default for UavcanNodeMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4456impl UtmDataAvailFlags {
4457    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4458}
4459impl Default for UtmDataAvailFlags {
4460    fn default() -> Self {
4461        Self::DEFAULT
4462    }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "Airborne status of UAS."]
4472pub enum UtmFlightState {
4473    #[doc = "The flight state can't be determined."]
4474    UTM_FLIGHT_STATE_UNKNOWN = 1,
4475    #[doc = "UAS on ground."]
4476    UTM_FLIGHT_STATE_GROUND = 2,
4477    #[doc = "UAS airborne."]
4478    UTM_FLIGHT_STATE_AIRBORNE = 3,
4479    #[doc = "UAS is in an emergency flight state."]
4480    UTM_FLIGHT_STATE_EMERGENCY = 16,
4481    #[doc = "UAS has no active controls."]
4482    UTM_FLIGHT_STATE_NOCTRL = 32,
4483}
4484impl UtmFlightState {
4485    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4486}
4487impl Default for UtmFlightState {
4488    fn default() -> Self {
4489        Self::DEFAULT
4490    }
4491}
4492#[cfg_attr(feature = "ts", derive(TS))]
4493#[cfg_attr(feature = "ts", ts(export))]
4494#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4496#[cfg_attr(feature = "serde", serde(tag = "type"))]
4497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4498#[repr(u32)]
4499#[doc = "Video stream encodings"]
4500pub enum VideoStreamEncoding {
4501    #[doc = "Stream encoding is unknown"]
4502    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4503    #[doc = "Stream encoding is H.264"]
4504    VIDEO_STREAM_ENCODING_H264 = 1,
4505    #[doc = "Stream encoding is H.265"]
4506    VIDEO_STREAM_ENCODING_H265 = 2,
4507}
4508impl VideoStreamEncoding {
4509    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4510}
4511impl Default for VideoStreamEncoding {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4517impl VideoStreamStatusFlags {
4518    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4519}
4520impl Default for VideoStreamStatusFlags {
4521    fn default() -> Self {
4522        Self::DEFAULT
4523    }
4524}
4525#[cfg_attr(feature = "ts", derive(TS))]
4526#[cfg_attr(feature = "ts", ts(export))]
4527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4529#[cfg_attr(feature = "serde", serde(tag = "type"))]
4530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4531#[repr(u32)]
4532#[doc = "Video stream types"]
4533pub enum VideoStreamType {
4534    #[doc = "Stream is RTSP"]
4535    VIDEO_STREAM_TYPE_RTSP = 0,
4536    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4537    VIDEO_STREAM_TYPE_RTPUDP = 1,
4538    #[doc = "Stream is MPEG on TCP"]
4539    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4540    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4541    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4542}
4543impl VideoStreamType {
4544    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4545}
4546impl Default for VideoStreamType {
4547    fn default() -> Self {
4548        Self::DEFAULT
4549    }
4550}
4551#[cfg_attr(feature = "ts", derive(TS))]
4552#[cfg_attr(feature = "ts", ts(export))]
4553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4555#[cfg_attr(feature = "serde", serde(tag = "type"))]
4556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4557#[repr(u32)]
4558#[doc = "Direction of VTOL transition"]
4559pub enum VtolTransitionHeading {
4560    #[doc = "Respect the heading configuration of the vehicle."]
4561    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4562    #[doc = "Use the heading pointing towards the next waypoint."]
4563    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4564    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4565    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4566    #[doc = "Use the specified heading in parameter 4."]
4567    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4568    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4569    VTOL_TRANSITION_HEADING_ANY = 4,
4570}
4571impl VtolTransitionHeading {
4572    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4573}
4574impl Default for VtolTransitionHeading {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "WiFi Mode."]
4587pub enum WifiConfigApMode {
4588    #[doc = "WiFi mode is undefined."]
4589    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4590    #[doc = "WiFi configured as an access point."]
4591    WIFI_CONFIG_AP_MODE_AP = 1,
4592    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4593    WIFI_CONFIG_AP_MODE_STATION = 2,
4594    #[doc = "WiFi disabled."]
4595    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4596}
4597impl WifiConfigApMode {
4598    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4599}
4600impl Default for WifiConfigApMode {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4613pub enum WifiConfigApResponse {
4614    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4615    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4616    #[doc = "Changes accepted."]
4617    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4618    #[doc = "Changes rejected."]
4619    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4620    #[doc = "Invalid Mode."]
4621    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4622    #[doc = "Invalid SSID."]
4623    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4624    #[doc = "Invalid Password."]
4625    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4626}
4627impl WifiConfigApResponse {
4628    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4629}
4630impl Default for WifiConfigApResponse {
4631    fn default() -> Self {
4632        Self::DEFAULT
4633    }
4634}
4635#[cfg_attr(feature = "ts", derive(TS))]
4636#[cfg_attr(feature = "ts", ts(export))]
4637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4639#[cfg_attr(feature = "serde", serde(tag = "type"))]
4640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4641#[repr(u32)]
4642#[doc = "Winch actions."]
4643pub enum WinchActions {
4644    #[doc = "Allow motor to freewheel."]
4645    WINCH_RELAXED = 0,
4646    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4647    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4648    #[doc = "Wind or unwind line at specified rate."]
4649    WINCH_RATE_CONTROL = 2,
4650    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4651    WINCH_LOCK = 3,
4652    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_DELIVER = 4,
4654    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_HOLD = 5,
4656    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_RETRACT = 6,
4658    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_LOAD_LINE = 7,
4660    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_ABANDON_LINE = 8,
4662    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4663    WINCH_LOAD_PAYLOAD = 9,
4664}
4665impl WinchActions {
4666    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4667}
4668impl Default for WinchActions {
4669    fn default() -> Self {
4670        Self::DEFAULT
4671    }
4672}
4673#[doc = "Set the vehicle attitude and body angular rates."]
4674#[doc = ""]
4675#[doc = "ID: 140"]
4676#[derive(Debug, Clone, PartialEq)]
4677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4679#[cfg_attr(feature = "ts", derive(TS))]
4680#[cfg_attr(feature = "ts", ts(export))]
4681pub struct ACTUATOR_CONTROL_TARGET_DATA {
4682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4683    pub time_usec: u64,
4684    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4687    pub controls: [f32; 8],
4688    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4689    pub group_mlx: u8,
4690}
4691impl ACTUATOR_CONTROL_TARGET_DATA {
4692    pub const ENCODED_LEN: usize = 41usize;
4693    pub const DEFAULT: Self = Self {
4694        time_usec: 0_u64,
4695        controls: [0.0_f32; 8usize],
4696        group_mlx: 0_u8,
4697    };
4698    #[cfg(feature = "arbitrary")]
4699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4700        use arbitrary::{Arbitrary, Unstructured};
4701        let mut buf = [0u8; 1024];
4702        rng.fill_bytes(&mut buf);
4703        let mut unstructured = Unstructured::new(&buf);
4704        Self::arbitrary(&mut unstructured).unwrap_or_default()
4705    }
4706}
4707impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4708    fn default() -> Self {
4709        Self::DEFAULT.clone()
4710    }
4711}
4712impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4713    type Message = MavMessage;
4714    const ID: u32 = 140u32;
4715    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4716    const EXTRA_CRC: u8 = 181u8;
4717    const ENCODED_LEN: usize = 41usize;
4718    fn deser(
4719        _version: MavlinkVersion,
4720        __input: &[u8],
4721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4722        let avail_len = __input.len();
4723        let mut payload_buf = [0; Self::ENCODED_LEN];
4724        let mut buf = if avail_len < Self::ENCODED_LEN {
4725            payload_buf[0..avail_len].copy_from_slice(__input);
4726            Bytes::new(&payload_buf)
4727        } else {
4728            Bytes::new(__input)
4729        };
4730        let mut __struct = Self::default();
4731        __struct.time_usec = buf.get_u64_le()?;
4732        for v in &mut __struct.controls {
4733            let val = buf.get_f32_le()?;
4734            *v = val;
4735        }
4736        __struct.group_mlx = buf.get_u8()?;
4737        Ok(__struct)
4738    }
4739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4740        let mut __tmp = BytesMut::new(bytes);
4741        #[allow(clippy::absurd_extreme_comparisons)]
4742        #[allow(unused_comparisons)]
4743        if __tmp.remaining() < Self::ENCODED_LEN {
4744            panic!(
4745                "buffer is too small (need {} bytes, but got {})",
4746                Self::ENCODED_LEN,
4747                __tmp.remaining(),
4748            )
4749        }
4750        __tmp.put_u64_le(self.time_usec);
4751        for val in &self.controls {
4752            __tmp.put_f32_le(*val);
4753        }
4754        __tmp.put_u8(self.group_mlx);
4755        if matches!(version, MavlinkVersion::V2) {
4756            let len = __tmp.len();
4757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4758        } else {
4759            __tmp.len()
4760        }
4761    }
4762}
4763#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4764#[doc = ""]
4765#[doc = "ID: 375"]
4766#[derive(Debug, Clone, PartialEq)]
4767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4769#[cfg_attr(feature = "ts", derive(TS))]
4770#[cfg_attr(feature = "ts", ts(export))]
4771pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4772    #[doc = "Timestamp (since system boot)."]
4773    pub time_usec: u64,
4774    #[doc = "Active outputs"]
4775    pub active: u32,
4776    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4779    pub actuator: [f32; 32],
4780}
4781impl ACTUATOR_OUTPUT_STATUS_DATA {
4782    pub const ENCODED_LEN: usize = 140usize;
4783    pub const DEFAULT: Self = Self {
4784        time_usec: 0_u64,
4785        active: 0_u32,
4786        actuator: [0.0_f32; 32usize],
4787    };
4788    #[cfg(feature = "arbitrary")]
4789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4790        use arbitrary::{Arbitrary, Unstructured};
4791        let mut buf = [0u8; 1024];
4792        rng.fill_bytes(&mut buf);
4793        let mut unstructured = Unstructured::new(&buf);
4794        Self::arbitrary(&mut unstructured).unwrap_or_default()
4795    }
4796}
4797impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4798    fn default() -> Self {
4799        Self::DEFAULT.clone()
4800    }
4801}
4802impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4803    type Message = MavMessage;
4804    const ID: u32 = 375u32;
4805    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4806    const EXTRA_CRC: u8 = 251u8;
4807    const ENCODED_LEN: usize = 140usize;
4808    fn deser(
4809        _version: MavlinkVersion,
4810        __input: &[u8],
4811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4812        let avail_len = __input.len();
4813        let mut payload_buf = [0; Self::ENCODED_LEN];
4814        let mut buf = if avail_len < Self::ENCODED_LEN {
4815            payload_buf[0..avail_len].copy_from_slice(__input);
4816            Bytes::new(&payload_buf)
4817        } else {
4818            Bytes::new(__input)
4819        };
4820        let mut __struct = Self::default();
4821        __struct.time_usec = buf.get_u64_le()?;
4822        __struct.active = buf.get_u32_le()?;
4823        for v in &mut __struct.actuator {
4824            let val = buf.get_f32_le()?;
4825            *v = val;
4826        }
4827        Ok(__struct)
4828    }
4829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4830        let mut __tmp = BytesMut::new(bytes);
4831        #[allow(clippy::absurd_extreme_comparisons)]
4832        #[allow(unused_comparisons)]
4833        if __tmp.remaining() < Self::ENCODED_LEN {
4834            panic!(
4835                "buffer is too small (need {} bytes, but got {})",
4836                Self::ENCODED_LEN,
4837                __tmp.remaining(),
4838            )
4839        }
4840        __tmp.put_u64_le(self.time_usec);
4841        __tmp.put_u32_le(self.active);
4842        for val in &self.actuator {
4843            __tmp.put_f32_le(*val);
4844        }
4845        if matches!(version, MavlinkVersion::V2) {
4846            let len = __tmp.len();
4847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4848        } else {
4849            __tmp.len()
4850        }
4851    }
4852}
4853#[doc = "The location and information of an ADSB vehicle."]
4854#[doc = ""]
4855#[doc = "ID: 246"]
4856#[derive(Debug, Clone, PartialEq)]
4857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4859#[cfg_attr(feature = "ts", derive(TS))]
4860#[cfg_attr(feature = "ts", ts(export))]
4861pub struct ADSB_VEHICLE_DATA {
4862    #[doc = "ICAO address"]
4863    pub ICAO_address: u32,
4864    #[doc = "Latitude"]
4865    pub lat: i32,
4866    #[doc = "Longitude"]
4867    pub lon: i32,
4868    #[doc = "Altitude(ASL)"]
4869    pub altitude: i32,
4870    #[doc = "Course over ground"]
4871    pub heading: u16,
4872    #[doc = "The horizontal velocity"]
4873    pub hor_velocity: u16,
4874    #[doc = "The vertical velocity. Positive is up"]
4875    pub ver_velocity: i16,
4876    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4877    pub flags: AdsbFlags,
4878    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4879    pub squawk: u16,
4880    #[doc = "ADSB altitude type."]
4881    pub altitude_type: AdsbAltitudeType,
4882    #[doc = "The callsign, 8+null"]
4883    #[cfg_attr(feature = "ts", ts(type = "string"))]
4884    pub callsign: CharArray<9>,
4885    #[doc = "ADSB emitter type."]
4886    pub emitter_type: AdsbEmitterType,
4887    #[doc = "Time since last communication in seconds"]
4888    pub tslc: u8,
4889}
4890impl ADSB_VEHICLE_DATA {
4891    pub const ENCODED_LEN: usize = 38usize;
4892    pub const DEFAULT: Self = Self {
4893        ICAO_address: 0_u32,
4894        lat: 0_i32,
4895        lon: 0_i32,
4896        altitude: 0_i32,
4897        heading: 0_u16,
4898        hor_velocity: 0_u16,
4899        ver_velocity: 0_i16,
4900        flags: AdsbFlags::DEFAULT,
4901        squawk: 0_u16,
4902        altitude_type: AdsbAltitudeType::DEFAULT,
4903        callsign: CharArray::new([0_u8; 9usize]),
4904        emitter_type: AdsbEmitterType::DEFAULT,
4905        tslc: 0_u8,
4906    };
4907    #[cfg(feature = "arbitrary")]
4908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4909        use arbitrary::{Arbitrary, Unstructured};
4910        let mut buf = [0u8; 1024];
4911        rng.fill_bytes(&mut buf);
4912        let mut unstructured = Unstructured::new(&buf);
4913        Self::arbitrary(&mut unstructured).unwrap_or_default()
4914    }
4915}
4916impl Default for ADSB_VEHICLE_DATA {
4917    fn default() -> Self {
4918        Self::DEFAULT.clone()
4919    }
4920}
4921impl MessageData for ADSB_VEHICLE_DATA {
4922    type Message = MavMessage;
4923    const ID: u32 = 246u32;
4924    const NAME: &'static str = "ADSB_VEHICLE";
4925    const EXTRA_CRC: u8 = 184u8;
4926    const ENCODED_LEN: usize = 38usize;
4927    fn deser(
4928        _version: MavlinkVersion,
4929        __input: &[u8],
4930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4931        let avail_len = __input.len();
4932        let mut payload_buf = [0; Self::ENCODED_LEN];
4933        let mut buf = if avail_len < Self::ENCODED_LEN {
4934            payload_buf[0..avail_len].copy_from_slice(__input);
4935            Bytes::new(&payload_buf)
4936        } else {
4937            Bytes::new(__input)
4938        };
4939        let mut __struct = Self::default();
4940        __struct.ICAO_address = buf.get_u32_le()?;
4941        __struct.lat = buf.get_i32_le()?;
4942        __struct.lon = buf.get_i32_le()?;
4943        __struct.altitude = buf.get_i32_le()?;
4944        __struct.heading = buf.get_u16_le()?;
4945        __struct.hor_velocity = buf.get_u16_le()?;
4946        __struct.ver_velocity = buf.get_i16_le()?;
4947        let tmp = buf.get_u16_le()?;
4948        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
4949            ::mavlink_core::error::ParserError::InvalidFlag {
4950                flag_type: "AdsbFlags",
4951                value: tmp as u64,
4952            },
4953        )?;
4954        __struct.squawk = buf.get_u16_le()?;
4955        let tmp = buf.get_u8()?;
4956        __struct.altitude_type =
4957            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4958                enum_type: "AdsbAltitudeType",
4959                value: tmp as u64,
4960            })?;
4961        let mut tmp = [0_u8; 9usize];
4962        for v in &mut tmp {
4963            *v = buf.get_u8()?;
4964        }
4965        __struct.callsign = CharArray::new(tmp);
4966        let tmp = buf.get_u8()?;
4967        __struct.emitter_type =
4968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4969                enum_type: "AdsbEmitterType",
4970                value: tmp as u64,
4971            })?;
4972        __struct.tslc = buf.get_u8()?;
4973        Ok(__struct)
4974    }
4975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4976        let mut __tmp = BytesMut::new(bytes);
4977        #[allow(clippy::absurd_extreme_comparisons)]
4978        #[allow(unused_comparisons)]
4979        if __tmp.remaining() < Self::ENCODED_LEN {
4980            panic!(
4981                "buffer is too small (need {} bytes, but got {})",
4982                Self::ENCODED_LEN,
4983                __tmp.remaining(),
4984            )
4985        }
4986        __tmp.put_u32_le(self.ICAO_address);
4987        __tmp.put_i32_le(self.lat);
4988        __tmp.put_i32_le(self.lon);
4989        __tmp.put_i32_le(self.altitude);
4990        __tmp.put_u16_le(self.heading);
4991        __tmp.put_u16_le(self.hor_velocity);
4992        __tmp.put_i16_le(self.ver_velocity);
4993        __tmp.put_u16_le(self.flags.bits() as u16);
4994        __tmp.put_u16_le(self.squawk);
4995        __tmp.put_u8(self.altitude_type as u8);
4996        for val in &self.callsign {
4997            __tmp.put_u8(*val);
4998        }
4999        __tmp.put_u8(self.emitter_type as u8);
5000        __tmp.put_u8(self.tslc);
5001        if matches!(version, MavlinkVersion::V2) {
5002            let len = __tmp.len();
5003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5004        } else {
5005            __tmp.len()
5006        }
5007    }
5008}
5009#[doc = "The location and information of an AIS vessel."]
5010#[doc = ""]
5011#[doc = "ID: 301"]
5012#[derive(Debug, Clone, PartialEq)]
5013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5015#[cfg_attr(feature = "ts", derive(TS))]
5016#[cfg_attr(feature = "ts", ts(export))]
5017pub struct AIS_VESSEL_DATA {
5018    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5019    pub MMSI: u32,
5020    #[doc = "Latitude"]
5021    pub lat: i32,
5022    #[doc = "Longitude"]
5023    pub lon: i32,
5024    #[doc = "Course over ground"]
5025    pub COG: u16,
5026    #[doc = "True heading"]
5027    pub heading: u16,
5028    #[doc = "Speed over ground"]
5029    pub velocity: u16,
5030    #[doc = "Distance from lat/lon location to bow"]
5031    pub dimension_bow: u16,
5032    #[doc = "Distance from lat/lon location to stern"]
5033    pub dimension_stern: u16,
5034    #[doc = "Time since last communication in seconds"]
5035    pub tslc: u16,
5036    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5037    pub flags: AisFlags,
5038    #[doc = "Turn rate"]
5039    pub turn_rate: i8,
5040    #[doc = "Navigational status"]
5041    pub navigational_status: AisNavStatus,
5042    #[doc = "Type of vessels"]
5043    pub mavtype: AisType,
5044    #[doc = "Distance from lat/lon location to port side"]
5045    pub dimension_port: u8,
5046    #[doc = "Distance from lat/lon location to starboard side"]
5047    pub dimension_starboard: u8,
5048    #[doc = "The vessel callsign"]
5049    #[cfg_attr(feature = "ts", ts(type = "string"))]
5050    pub callsign: CharArray<7>,
5051    #[doc = "The vessel name"]
5052    #[cfg_attr(feature = "ts", ts(type = "string"))]
5053    pub name: CharArray<20>,
5054}
5055impl AIS_VESSEL_DATA {
5056    pub const ENCODED_LEN: usize = 58usize;
5057    pub const DEFAULT: Self = Self {
5058        MMSI: 0_u32,
5059        lat: 0_i32,
5060        lon: 0_i32,
5061        COG: 0_u16,
5062        heading: 0_u16,
5063        velocity: 0_u16,
5064        dimension_bow: 0_u16,
5065        dimension_stern: 0_u16,
5066        tslc: 0_u16,
5067        flags: AisFlags::DEFAULT,
5068        turn_rate: 0_i8,
5069        navigational_status: AisNavStatus::DEFAULT,
5070        mavtype: AisType::DEFAULT,
5071        dimension_port: 0_u8,
5072        dimension_starboard: 0_u8,
5073        callsign: CharArray::new([0_u8; 7usize]),
5074        name: CharArray::new([0_u8; 20usize]),
5075    };
5076    #[cfg(feature = "arbitrary")]
5077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5078        use arbitrary::{Arbitrary, Unstructured};
5079        let mut buf = [0u8; 1024];
5080        rng.fill_bytes(&mut buf);
5081        let mut unstructured = Unstructured::new(&buf);
5082        Self::arbitrary(&mut unstructured).unwrap_or_default()
5083    }
5084}
5085impl Default for AIS_VESSEL_DATA {
5086    fn default() -> Self {
5087        Self::DEFAULT.clone()
5088    }
5089}
5090impl MessageData for AIS_VESSEL_DATA {
5091    type Message = MavMessage;
5092    const ID: u32 = 301u32;
5093    const NAME: &'static str = "AIS_VESSEL";
5094    const EXTRA_CRC: u8 = 243u8;
5095    const ENCODED_LEN: usize = 58usize;
5096    fn deser(
5097        _version: MavlinkVersion,
5098        __input: &[u8],
5099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5100        let avail_len = __input.len();
5101        let mut payload_buf = [0; Self::ENCODED_LEN];
5102        let mut buf = if avail_len < Self::ENCODED_LEN {
5103            payload_buf[0..avail_len].copy_from_slice(__input);
5104            Bytes::new(&payload_buf)
5105        } else {
5106            Bytes::new(__input)
5107        };
5108        let mut __struct = Self::default();
5109        __struct.MMSI = buf.get_u32_le()?;
5110        __struct.lat = buf.get_i32_le()?;
5111        __struct.lon = buf.get_i32_le()?;
5112        __struct.COG = buf.get_u16_le()?;
5113        __struct.heading = buf.get_u16_le()?;
5114        __struct.velocity = buf.get_u16_le()?;
5115        __struct.dimension_bow = buf.get_u16_le()?;
5116        __struct.dimension_stern = buf.get_u16_le()?;
5117        __struct.tslc = buf.get_u16_le()?;
5118        let tmp = buf.get_u16_le()?;
5119        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5120            ::mavlink_core::error::ParserError::InvalidFlag {
5121                flag_type: "AisFlags",
5122                value: tmp as u64,
5123            },
5124        )?;
5125        __struct.turn_rate = buf.get_i8()?;
5126        let tmp = buf.get_u8()?;
5127        __struct.navigational_status =
5128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5129                enum_type: "AisNavStatus",
5130                value: tmp as u64,
5131            })?;
5132        let tmp = buf.get_u8()?;
5133        __struct.mavtype =
5134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5135                enum_type: "AisType",
5136                value: tmp as u64,
5137            })?;
5138        __struct.dimension_port = buf.get_u8()?;
5139        __struct.dimension_starboard = buf.get_u8()?;
5140        let mut tmp = [0_u8; 7usize];
5141        for v in &mut tmp {
5142            *v = buf.get_u8()?;
5143        }
5144        __struct.callsign = CharArray::new(tmp);
5145        let mut tmp = [0_u8; 20usize];
5146        for v in &mut tmp {
5147            *v = buf.get_u8()?;
5148        }
5149        __struct.name = CharArray::new(tmp);
5150        Ok(__struct)
5151    }
5152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5153        let mut __tmp = BytesMut::new(bytes);
5154        #[allow(clippy::absurd_extreme_comparisons)]
5155        #[allow(unused_comparisons)]
5156        if __tmp.remaining() < Self::ENCODED_LEN {
5157            panic!(
5158                "buffer is too small (need {} bytes, but got {})",
5159                Self::ENCODED_LEN,
5160                __tmp.remaining(),
5161            )
5162        }
5163        __tmp.put_u32_le(self.MMSI);
5164        __tmp.put_i32_le(self.lat);
5165        __tmp.put_i32_le(self.lon);
5166        __tmp.put_u16_le(self.COG);
5167        __tmp.put_u16_le(self.heading);
5168        __tmp.put_u16_le(self.velocity);
5169        __tmp.put_u16_le(self.dimension_bow);
5170        __tmp.put_u16_le(self.dimension_stern);
5171        __tmp.put_u16_le(self.tslc);
5172        __tmp.put_u16_le(self.flags.bits() as u16);
5173        __tmp.put_i8(self.turn_rate);
5174        __tmp.put_u8(self.navigational_status as u8);
5175        __tmp.put_u8(self.mavtype as u8);
5176        __tmp.put_u8(self.dimension_port);
5177        __tmp.put_u8(self.dimension_starboard);
5178        for val in &self.callsign {
5179            __tmp.put_u8(*val);
5180        }
5181        for val in &self.name {
5182            __tmp.put_u8(*val);
5183        }
5184        if matches!(version, MavlinkVersion::V2) {
5185            let len = __tmp.len();
5186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5187        } else {
5188            __tmp.len()
5189        }
5190    }
5191}
5192#[doc = "The current system altitude."]
5193#[doc = ""]
5194#[doc = "ID: 141"]
5195#[derive(Debug, Clone, PartialEq)]
5196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5198#[cfg_attr(feature = "ts", derive(TS))]
5199#[cfg_attr(feature = "ts", ts(export))]
5200pub struct ALTITUDE_DATA {
5201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5202    pub time_usec: u64,
5203    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5204    pub altitude_monotonic: f32,
5205    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5206    pub altitude_amsl: f32,
5207    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5208    pub altitude_local: f32,
5209    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5210    pub altitude_relative: f32,
5211    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5212    pub altitude_terrain: f32,
5213    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5214    pub bottom_clearance: f32,
5215}
5216impl ALTITUDE_DATA {
5217    pub const ENCODED_LEN: usize = 32usize;
5218    pub const DEFAULT: Self = Self {
5219        time_usec: 0_u64,
5220        altitude_monotonic: 0.0_f32,
5221        altitude_amsl: 0.0_f32,
5222        altitude_local: 0.0_f32,
5223        altitude_relative: 0.0_f32,
5224        altitude_terrain: 0.0_f32,
5225        bottom_clearance: 0.0_f32,
5226    };
5227    #[cfg(feature = "arbitrary")]
5228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5229        use arbitrary::{Arbitrary, Unstructured};
5230        let mut buf = [0u8; 1024];
5231        rng.fill_bytes(&mut buf);
5232        let mut unstructured = Unstructured::new(&buf);
5233        Self::arbitrary(&mut unstructured).unwrap_or_default()
5234    }
5235}
5236impl Default for ALTITUDE_DATA {
5237    fn default() -> Self {
5238        Self::DEFAULT.clone()
5239    }
5240}
5241impl MessageData for ALTITUDE_DATA {
5242    type Message = MavMessage;
5243    const ID: u32 = 141u32;
5244    const NAME: &'static str = "ALTITUDE";
5245    const EXTRA_CRC: u8 = 47u8;
5246    const ENCODED_LEN: usize = 32usize;
5247    fn deser(
5248        _version: MavlinkVersion,
5249        __input: &[u8],
5250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5251        let avail_len = __input.len();
5252        let mut payload_buf = [0; Self::ENCODED_LEN];
5253        let mut buf = if avail_len < Self::ENCODED_LEN {
5254            payload_buf[0..avail_len].copy_from_slice(__input);
5255            Bytes::new(&payload_buf)
5256        } else {
5257            Bytes::new(__input)
5258        };
5259        let mut __struct = Self::default();
5260        __struct.time_usec = buf.get_u64_le()?;
5261        __struct.altitude_monotonic = buf.get_f32_le()?;
5262        __struct.altitude_amsl = buf.get_f32_le()?;
5263        __struct.altitude_local = buf.get_f32_le()?;
5264        __struct.altitude_relative = buf.get_f32_le()?;
5265        __struct.altitude_terrain = buf.get_f32_le()?;
5266        __struct.bottom_clearance = buf.get_f32_le()?;
5267        Ok(__struct)
5268    }
5269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5270        let mut __tmp = BytesMut::new(bytes);
5271        #[allow(clippy::absurd_extreme_comparisons)]
5272        #[allow(unused_comparisons)]
5273        if __tmp.remaining() < Self::ENCODED_LEN {
5274            panic!(
5275                "buffer is too small (need {} bytes, but got {})",
5276                Self::ENCODED_LEN,
5277                __tmp.remaining(),
5278            )
5279        }
5280        __tmp.put_u64_le(self.time_usec);
5281        __tmp.put_f32_le(self.altitude_monotonic);
5282        __tmp.put_f32_le(self.altitude_amsl);
5283        __tmp.put_f32_le(self.altitude_local);
5284        __tmp.put_f32_le(self.altitude_relative);
5285        __tmp.put_f32_le(self.altitude_terrain);
5286        __tmp.put_f32_le(self.bottom_clearance);
5287        if matches!(version, MavlinkVersion::V2) {
5288            let len = __tmp.len();
5289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5290        } else {
5291            __tmp.len()
5292        }
5293    }
5294}
5295#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5296#[doc = ""]
5297#[doc = "ID: 30"]
5298#[derive(Debug, Clone, PartialEq)]
5299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5301#[cfg_attr(feature = "ts", derive(TS))]
5302#[cfg_attr(feature = "ts", ts(export))]
5303pub struct ATTITUDE_DATA {
5304    #[doc = "Timestamp (time since system boot)."]
5305    pub time_boot_ms: u32,
5306    #[doc = "Roll angle (-pi..+pi)"]
5307    pub roll: f32,
5308    #[doc = "Pitch angle (-pi..+pi)"]
5309    pub pitch: f32,
5310    #[doc = "Yaw angle (-pi..+pi)"]
5311    pub yaw: f32,
5312    #[doc = "Roll angular speed"]
5313    pub rollspeed: f32,
5314    #[doc = "Pitch angular speed"]
5315    pub pitchspeed: f32,
5316    #[doc = "Yaw angular speed"]
5317    pub yawspeed: f32,
5318}
5319impl ATTITUDE_DATA {
5320    pub const ENCODED_LEN: usize = 28usize;
5321    pub const DEFAULT: Self = Self {
5322        time_boot_ms: 0_u32,
5323        roll: 0.0_f32,
5324        pitch: 0.0_f32,
5325        yaw: 0.0_f32,
5326        rollspeed: 0.0_f32,
5327        pitchspeed: 0.0_f32,
5328        yawspeed: 0.0_f32,
5329    };
5330    #[cfg(feature = "arbitrary")]
5331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5332        use arbitrary::{Arbitrary, Unstructured};
5333        let mut buf = [0u8; 1024];
5334        rng.fill_bytes(&mut buf);
5335        let mut unstructured = Unstructured::new(&buf);
5336        Self::arbitrary(&mut unstructured).unwrap_or_default()
5337    }
5338}
5339impl Default for ATTITUDE_DATA {
5340    fn default() -> Self {
5341        Self::DEFAULT.clone()
5342    }
5343}
5344impl MessageData for ATTITUDE_DATA {
5345    type Message = MavMessage;
5346    const ID: u32 = 30u32;
5347    const NAME: &'static str = "ATTITUDE";
5348    const EXTRA_CRC: u8 = 39u8;
5349    const ENCODED_LEN: usize = 28usize;
5350    fn deser(
5351        _version: MavlinkVersion,
5352        __input: &[u8],
5353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5354        let avail_len = __input.len();
5355        let mut payload_buf = [0; Self::ENCODED_LEN];
5356        let mut buf = if avail_len < Self::ENCODED_LEN {
5357            payload_buf[0..avail_len].copy_from_slice(__input);
5358            Bytes::new(&payload_buf)
5359        } else {
5360            Bytes::new(__input)
5361        };
5362        let mut __struct = Self::default();
5363        __struct.time_boot_ms = buf.get_u32_le()?;
5364        __struct.roll = buf.get_f32_le()?;
5365        __struct.pitch = buf.get_f32_le()?;
5366        __struct.yaw = buf.get_f32_le()?;
5367        __struct.rollspeed = buf.get_f32_le()?;
5368        __struct.pitchspeed = buf.get_f32_le()?;
5369        __struct.yawspeed = buf.get_f32_le()?;
5370        Ok(__struct)
5371    }
5372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5373        let mut __tmp = BytesMut::new(bytes);
5374        #[allow(clippy::absurd_extreme_comparisons)]
5375        #[allow(unused_comparisons)]
5376        if __tmp.remaining() < Self::ENCODED_LEN {
5377            panic!(
5378                "buffer is too small (need {} bytes, but got {})",
5379                Self::ENCODED_LEN,
5380                __tmp.remaining(),
5381            )
5382        }
5383        __tmp.put_u32_le(self.time_boot_ms);
5384        __tmp.put_f32_le(self.roll);
5385        __tmp.put_f32_le(self.pitch);
5386        __tmp.put_f32_le(self.yaw);
5387        __tmp.put_f32_le(self.rollspeed);
5388        __tmp.put_f32_le(self.pitchspeed);
5389        __tmp.put_f32_le(self.yawspeed);
5390        if matches!(version, MavlinkVersion::V2) {
5391            let len = __tmp.len();
5392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5393        } else {
5394            __tmp.len()
5395        }
5396    }
5397}
5398#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5399#[doc = ""]
5400#[doc = "ID: 31"]
5401#[derive(Debug, Clone, PartialEq)]
5402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5404#[cfg_attr(feature = "ts", derive(TS))]
5405#[cfg_attr(feature = "ts", ts(export))]
5406pub struct ATTITUDE_QUATERNION_DATA {
5407    #[doc = "Timestamp (time since system boot)."]
5408    pub time_boot_ms: u32,
5409    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5410    pub q1: f32,
5411    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5412    pub q2: f32,
5413    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5414    pub q3: f32,
5415    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5416    pub q4: f32,
5417    #[doc = "Roll angular speed"]
5418    pub rollspeed: f32,
5419    #[doc = "Pitch angular speed"]
5420    pub pitchspeed: f32,
5421    #[doc = "Yaw angular speed"]
5422    pub yawspeed: f32,
5423    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5427    pub repr_offset_q: [f32; 4],
5428}
5429impl ATTITUDE_QUATERNION_DATA {
5430    pub const ENCODED_LEN: usize = 48usize;
5431    pub const DEFAULT: Self = Self {
5432        time_boot_ms: 0_u32,
5433        q1: 0.0_f32,
5434        q2: 0.0_f32,
5435        q3: 0.0_f32,
5436        q4: 0.0_f32,
5437        rollspeed: 0.0_f32,
5438        pitchspeed: 0.0_f32,
5439        yawspeed: 0.0_f32,
5440        repr_offset_q: [0.0_f32; 4usize],
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_QUATERNION_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_QUATERNION_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 31u32;
5459    const NAME: &'static str = "ATTITUDE_QUATERNION";
5460    const EXTRA_CRC: u8 = 246u8;
5461    const ENCODED_LEN: usize = 48usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le()?;
5476        __struct.q1 = buf.get_f32_le()?;
5477        __struct.q2 = buf.get_f32_le()?;
5478        __struct.q3 = buf.get_f32_le()?;
5479        __struct.q4 = buf.get_f32_le()?;
5480        __struct.rollspeed = buf.get_f32_le()?;
5481        __struct.pitchspeed = buf.get_f32_le()?;
5482        __struct.yawspeed = buf.get_f32_le()?;
5483        for v in &mut __struct.repr_offset_q {
5484            let val = buf.get_f32_le()?;
5485            *v = val;
5486        }
5487        Ok(__struct)
5488    }
5489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5490        let mut __tmp = BytesMut::new(bytes);
5491        #[allow(clippy::absurd_extreme_comparisons)]
5492        #[allow(unused_comparisons)]
5493        if __tmp.remaining() < Self::ENCODED_LEN {
5494            panic!(
5495                "buffer is too small (need {} bytes, but got {})",
5496                Self::ENCODED_LEN,
5497                __tmp.remaining(),
5498            )
5499        }
5500        __tmp.put_u32_le(self.time_boot_ms);
5501        __tmp.put_f32_le(self.q1);
5502        __tmp.put_f32_le(self.q2);
5503        __tmp.put_f32_le(self.q3);
5504        __tmp.put_f32_le(self.q4);
5505        __tmp.put_f32_le(self.rollspeed);
5506        __tmp.put_f32_le(self.pitchspeed);
5507        __tmp.put_f32_le(self.yawspeed);
5508        if matches!(version, MavlinkVersion::V2) {
5509            for val in &self.repr_offset_q {
5510                __tmp.put_f32_le(*val);
5511            }
5512            let len = __tmp.len();
5513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5514        } else {
5515            __tmp.len()
5516        }
5517    }
5518}
5519#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5520#[doc = ""]
5521#[doc = "ID: 61"]
5522#[derive(Debug, Clone, PartialEq)]
5523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5525#[cfg_attr(feature = "ts", derive(TS))]
5526#[cfg_attr(feature = "ts", ts(export))]
5527pub struct ATTITUDE_QUATERNION_COV_DATA {
5528    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5529    pub time_usec: u64,
5530    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5533    pub q: [f32; 4],
5534    #[doc = "Roll angular speed"]
5535    pub rollspeed: f32,
5536    #[doc = "Pitch angular speed"]
5537    pub pitchspeed: f32,
5538    #[doc = "Yaw angular speed"]
5539    pub yawspeed: f32,
5540    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5543    pub covariance: [f32; 9],
5544}
5545impl ATTITUDE_QUATERNION_COV_DATA {
5546    pub const ENCODED_LEN: usize = 72usize;
5547    pub const DEFAULT: Self = Self {
5548        time_usec: 0_u64,
5549        q: [0.0_f32; 4usize],
5550        rollspeed: 0.0_f32,
5551        pitchspeed: 0.0_f32,
5552        yawspeed: 0.0_f32,
5553        covariance: [0.0_f32; 9usize],
5554    };
5555    #[cfg(feature = "arbitrary")]
5556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5557        use arbitrary::{Arbitrary, Unstructured};
5558        let mut buf = [0u8; 1024];
5559        rng.fill_bytes(&mut buf);
5560        let mut unstructured = Unstructured::new(&buf);
5561        Self::arbitrary(&mut unstructured).unwrap_or_default()
5562    }
5563}
5564impl Default for ATTITUDE_QUATERNION_COV_DATA {
5565    fn default() -> Self {
5566        Self::DEFAULT.clone()
5567    }
5568}
5569impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5570    type Message = MavMessage;
5571    const ID: u32 = 61u32;
5572    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5573    const EXTRA_CRC: u8 = 167u8;
5574    const ENCODED_LEN: usize = 72usize;
5575    fn deser(
5576        _version: MavlinkVersion,
5577        __input: &[u8],
5578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5579        let avail_len = __input.len();
5580        let mut payload_buf = [0; Self::ENCODED_LEN];
5581        let mut buf = if avail_len < Self::ENCODED_LEN {
5582            payload_buf[0..avail_len].copy_from_slice(__input);
5583            Bytes::new(&payload_buf)
5584        } else {
5585            Bytes::new(__input)
5586        };
5587        let mut __struct = Self::default();
5588        __struct.time_usec = buf.get_u64_le()?;
5589        for v in &mut __struct.q {
5590            let val = buf.get_f32_le()?;
5591            *v = val;
5592        }
5593        __struct.rollspeed = buf.get_f32_le()?;
5594        __struct.pitchspeed = buf.get_f32_le()?;
5595        __struct.yawspeed = buf.get_f32_le()?;
5596        for v in &mut __struct.covariance {
5597            let val = buf.get_f32_le()?;
5598            *v = val;
5599        }
5600        Ok(__struct)
5601    }
5602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5603        let mut __tmp = BytesMut::new(bytes);
5604        #[allow(clippy::absurd_extreme_comparisons)]
5605        #[allow(unused_comparisons)]
5606        if __tmp.remaining() < Self::ENCODED_LEN {
5607            panic!(
5608                "buffer is too small (need {} bytes, but got {})",
5609                Self::ENCODED_LEN,
5610                __tmp.remaining(),
5611            )
5612        }
5613        __tmp.put_u64_le(self.time_usec);
5614        for val in &self.q {
5615            __tmp.put_f32_le(*val);
5616        }
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        for val in &self.covariance {
5621            __tmp.put_f32_le(*val);
5622        }
5623        if matches!(version, MavlinkVersion::V2) {
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5632#[doc = ""]
5633#[doc = "ID: 83"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_TARGET_DATA {
5640    #[doc = "Timestamp (time since system boot)."]
5641    pub time_boot_ms: u32,
5642    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Body roll rate"]
5647    pub body_roll_rate: f32,
5648    #[doc = "Body pitch rate"]
5649    pub body_pitch_rate: f32,
5650    #[doc = "Body yaw rate"]
5651    pub body_yaw_rate: f32,
5652    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5653    pub thrust: f32,
5654    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5655    pub type_mask: AttitudeTargetTypemask,
5656}
5657impl ATTITUDE_TARGET_DATA {
5658    pub const ENCODED_LEN: usize = 37usize;
5659    pub const DEFAULT: Self = Self {
5660        time_boot_ms: 0_u32,
5661        q: [0.0_f32; 4usize],
5662        body_roll_rate: 0.0_f32,
5663        body_pitch_rate: 0.0_f32,
5664        body_yaw_rate: 0.0_f32,
5665        thrust: 0.0_f32,
5666        type_mask: AttitudeTargetTypemask::DEFAULT,
5667    };
5668    #[cfg(feature = "arbitrary")]
5669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5670        use arbitrary::{Arbitrary, Unstructured};
5671        let mut buf = [0u8; 1024];
5672        rng.fill_bytes(&mut buf);
5673        let mut unstructured = Unstructured::new(&buf);
5674        Self::arbitrary(&mut unstructured).unwrap_or_default()
5675    }
5676}
5677impl Default for ATTITUDE_TARGET_DATA {
5678    fn default() -> Self {
5679        Self::DEFAULT.clone()
5680    }
5681}
5682impl MessageData for ATTITUDE_TARGET_DATA {
5683    type Message = MavMessage;
5684    const ID: u32 = 83u32;
5685    const NAME: &'static str = "ATTITUDE_TARGET";
5686    const EXTRA_CRC: u8 = 22u8;
5687    const ENCODED_LEN: usize = 37usize;
5688    fn deser(
5689        _version: MavlinkVersion,
5690        __input: &[u8],
5691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5692        let avail_len = __input.len();
5693        let mut payload_buf = [0; Self::ENCODED_LEN];
5694        let mut buf = if avail_len < Self::ENCODED_LEN {
5695            payload_buf[0..avail_len].copy_from_slice(__input);
5696            Bytes::new(&payload_buf)
5697        } else {
5698            Bytes::new(__input)
5699        };
5700        let mut __struct = Self::default();
5701        __struct.time_boot_ms = buf.get_u32_le()?;
5702        for v in &mut __struct.q {
5703            let val = buf.get_f32_le()?;
5704            *v = val;
5705        }
5706        __struct.body_roll_rate = buf.get_f32_le()?;
5707        __struct.body_pitch_rate = buf.get_f32_le()?;
5708        __struct.body_yaw_rate = buf.get_f32_le()?;
5709        __struct.thrust = buf.get_f32_le()?;
5710        let tmp = buf.get_u8()?;
5711        __struct.type_mask =
5712            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5713                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5714                    flag_type: "AttitudeTargetTypemask",
5715                    value: tmp as u64,
5716                })?;
5717        Ok(__struct)
5718    }
5719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5720        let mut __tmp = BytesMut::new(bytes);
5721        #[allow(clippy::absurd_extreme_comparisons)]
5722        #[allow(unused_comparisons)]
5723        if __tmp.remaining() < Self::ENCODED_LEN {
5724            panic!(
5725                "buffer is too small (need {} bytes, but got {})",
5726                Self::ENCODED_LEN,
5727                __tmp.remaining(),
5728            )
5729        }
5730        __tmp.put_u32_le(self.time_boot_ms);
5731        for val in &self.q {
5732            __tmp.put_f32_le(*val);
5733        }
5734        __tmp.put_f32_le(self.body_roll_rate);
5735        __tmp.put_f32_le(self.body_pitch_rate);
5736        __tmp.put_f32_le(self.body_yaw_rate);
5737        __tmp.put_f32_le(self.thrust);
5738        __tmp.put_u8(self.type_mask.bits() as u8);
5739        if matches!(version, MavlinkVersion::V2) {
5740            let len = __tmp.len();
5741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5742        } else {
5743            __tmp.len()
5744        }
5745    }
5746}
5747#[doc = "Motion capture attitude and position."]
5748#[doc = ""]
5749#[doc = "ID: 138"]
5750#[derive(Debug, Clone, PartialEq)]
5751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5753#[cfg_attr(feature = "ts", derive(TS))]
5754#[cfg_attr(feature = "ts", ts(export))]
5755pub struct ATT_POS_MOCAP_DATA {
5756    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5757    pub time_usec: u64,
5758    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5760    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5761    pub q: [f32; 4],
5762    #[doc = "X position (NED)"]
5763    pub x: f32,
5764    #[doc = "Y position (NED)"]
5765    pub y: f32,
5766    #[doc = "Z position (NED)"]
5767    pub z: f32,
5768    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5772    pub covariance: [f32; 21],
5773}
5774impl ATT_POS_MOCAP_DATA {
5775    pub const ENCODED_LEN: usize = 120usize;
5776    pub const DEFAULT: Self = Self {
5777        time_usec: 0_u64,
5778        q: [0.0_f32; 4usize],
5779        x: 0.0_f32,
5780        y: 0.0_f32,
5781        z: 0.0_f32,
5782        covariance: [0.0_f32; 21usize],
5783    };
5784    #[cfg(feature = "arbitrary")]
5785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5786        use arbitrary::{Arbitrary, Unstructured};
5787        let mut buf = [0u8; 1024];
5788        rng.fill_bytes(&mut buf);
5789        let mut unstructured = Unstructured::new(&buf);
5790        Self::arbitrary(&mut unstructured).unwrap_or_default()
5791    }
5792}
5793impl Default for ATT_POS_MOCAP_DATA {
5794    fn default() -> Self {
5795        Self::DEFAULT.clone()
5796    }
5797}
5798impl MessageData for ATT_POS_MOCAP_DATA {
5799    type Message = MavMessage;
5800    const ID: u32 = 138u32;
5801    const NAME: &'static str = "ATT_POS_MOCAP";
5802    const EXTRA_CRC: u8 = 109u8;
5803    const ENCODED_LEN: usize = 120usize;
5804    fn deser(
5805        _version: MavlinkVersion,
5806        __input: &[u8],
5807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5808        let avail_len = __input.len();
5809        let mut payload_buf = [0; Self::ENCODED_LEN];
5810        let mut buf = if avail_len < Self::ENCODED_LEN {
5811            payload_buf[0..avail_len].copy_from_slice(__input);
5812            Bytes::new(&payload_buf)
5813        } else {
5814            Bytes::new(__input)
5815        };
5816        let mut __struct = Self::default();
5817        __struct.time_usec = buf.get_u64_le()?;
5818        for v in &mut __struct.q {
5819            let val = buf.get_f32_le()?;
5820            *v = val;
5821        }
5822        __struct.x = buf.get_f32_le()?;
5823        __struct.y = buf.get_f32_le()?;
5824        __struct.z = buf.get_f32_le()?;
5825        for v in &mut __struct.covariance {
5826            let val = buf.get_f32_le()?;
5827            *v = val;
5828        }
5829        Ok(__struct)
5830    }
5831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5832        let mut __tmp = BytesMut::new(bytes);
5833        #[allow(clippy::absurd_extreme_comparisons)]
5834        #[allow(unused_comparisons)]
5835        if __tmp.remaining() < Self::ENCODED_LEN {
5836            panic!(
5837                "buffer is too small (need {} bytes, but got {})",
5838                Self::ENCODED_LEN,
5839                __tmp.remaining(),
5840            )
5841        }
5842        __tmp.put_u64_le(self.time_usec);
5843        for val in &self.q {
5844            __tmp.put_f32_le(*val);
5845        }
5846        __tmp.put_f32_le(self.x);
5847        __tmp.put_f32_le(self.y);
5848        __tmp.put_f32_le(self.z);
5849        if matches!(version, MavlinkVersion::V2) {
5850            for val in &self.covariance {
5851                __tmp.put_f32_le(*val);
5852            }
5853            let len = __tmp.len();
5854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5855        } else {
5856            __tmp.len()
5857        }
5858    }
5859}
5860#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5861#[doc = ""]
5862#[doc = "ID: 7"]
5863#[derive(Debug, Clone, PartialEq)]
5864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5866#[cfg_attr(feature = "ts", derive(TS))]
5867#[cfg_attr(feature = "ts", ts(export))]
5868pub struct AUTH_KEY_DATA {
5869    #[doc = "key"]
5870    #[cfg_attr(feature = "ts", ts(type = "string"))]
5871    pub key: CharArray<32>,
5872}
5873impl AUTH_KEY_DATA {
5874    pub const ENCODED_LEN: usize = 32usize;
5875    pub const DEFAULT: Self = Self {
5876        key: CharArray::new([0_u8; 32usize]),
5877    };
5878    #[cfg(feature = "arbitrary")]
5879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5880        use arbitrary::{Arbitrary, Unstructured};
5881        let mut buf = [0u8; 1024];
5882        rng.fill_bytes(&mut buf);
5883        let mut unstructured = Unstructured::new(&buf);
5884        Self::arbitrary(&mut unstructured).unwrap_or_default()
5885    }
5886}
5887impl Default for AUTH_KEY_DATA {
5888    fn default() -> Self {
5889        Self::DEFAULT.clone()
5890    }
5891}
5892impl MessageData for AUTH_KEY_DATA {
5893    type Message = MavMessage;
5894    const ID: u32 = 7u32;
5895    const NAME: &'static str = "AUTH_KEY";
5896    const EXTRA_CRC: u8 = 119u8;
5897    const ENCODED_LEN: usize = 32usize;
5898    fn deser(
5899        _version: MavlinkVersion,
5900        __input: &[u8],
5901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5902        let avail_len = __input.len();
5903        let mut payload_buf = [0; Self::ENCODED_LEN];
5904        let mut buf = if avail_len < Self::ENCODED_LEN {
5905            payload_buf[0..avail_len].copy_from_slice(__input);
5906            Bytes::new(&payload_buf)
5907        } else {
5908            Bytes::new(__input)
5909        };
5910        let mut __struct = Self::default();
5911        let mut tmp = [0_u8; 32usize];
5912        for v in &mut tmp {
5913            *v = buf.get_u8()?;
5914        }
5915        __struct.key = CharArray::new(tmp);
5916        Ok(__struct)
5917    }
5918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5919        let mut __tmp = BytesMut::new(bytes);
5920        #[allow(clippy::absurd_extreme_comparisons)]
5921        #[allow(unused_comparisons)]
5922        if __tmp.remaining() < Self::ENCODED_LEN {
5923            panic!(
5924                "buffer is too small (need {} bytes, but got {})",
5925                Self::ENCODED_LEN,
5926                __tmp.remaining(),
5927            )
5928        }
5929        for val in &self.key {
5930            __tmp.put_u8(*val);
5931        }
5932        if matches!(version, MavlinkVersion::V2) {
5933            let len = __tmp.len();
5934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5935        } else {
5936            __tmp.len()
5937        }
5938    }
5939}
5940#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5941#[doc = ""]
5942#[doc = "ID: 286"]
5943#[derive(Debug, Clone, PartialEq)]
5944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5946#[cfg_attr(feature = "ts", derive(TS))]
5947#[cfg_attr(feature = "ts", ts(export))]
5948pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5949    #[doc = "Timestamp (time since system boot)."]
5950    pub time_boot_us: u64,
5951    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5954    pub q: [f32; 4],
5955    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5956    pub q_estimated_delay_us: u32,
5957    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5958    pub vx: f32,
5959    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5960    pub vy: f32,
5961    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5962    pub vz: f32,
5963    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5964    pub v_estimated_delay_us: u32,
5965    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5966    pub feed_forward_angular_velocity_z: f32,
5967    #[doc = "Bitmap indicating which estimator outputs are valid."]
5968    pub estimator_status: EstimatorStatusFlags,
5969    #[doc = "System ID"]
5970    pub target_system: u8,
5971    #[doc = "Component ID"]
5972    pub target_component: u8,
5973    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5974    pub landed_state: MavLandedState,
5975    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5977    pub angular_velocity_z: f32,
5978}
5979impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5980    pub const ENCODED_LEN: usize = 57usize;
5981    pub const DEFAULT: Self = Self {
5982        time_boot_us: 0_u64,
5983        q: [0.0_f32; 4usize],
5984        q_estimated_delay_us: 0_u32,
5985        vx: 0.0_f32,
5986        vy: 0.0_f32,
5987        vz: 0.0_f32,
5988        v_estimated_delay_us: 0_u32,
5989        feed_forward_angular_velocity_z: 0.0_f32,
5990        estimator_status: EstimatorStatusFlags::DEFAULT,
5991        target_system: 0_u8,
5992        target_component: 0_u8,
5993        landed_state: MavLandedState::DEFAULT,
5994        angular_velocity_z: 0.0_f32,
5995    };
5996    #[cfg(feature = "arbitrary")]
5997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5998        use arbitrary::{Arbitrary, Unstructured};
5999        let mut buf = [0u8; 1024];
6000        rng.fill_bytes(&mut buf);
6001        let mut unstructured = Unstructured::new(&buf);
6002        Self::arbitrary(&mut unstructured).unwrap_or_default()
6003    }
6004}
6005impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6006    fn default() -> Self {
6007        Self::DEFAULT.clone()
6008    }
6009}
6010impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6011    type Message = MavMessage;
6012    const ID: u32 = 286u32;
6013    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6014    const EXTRA_CRC: u8 = 210u8;
6015    const ENCODED_LEN: usize = 57usize;
6016    fn deser(
6017        _version: MavlinkVersion,
6018        __input: &[u8],
6019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6020        let avail_len = __input.len();
6021        let mut payload_buf = [0; Self::ENCODED_LEN];
6022        let mut buf = if avail_len < Self::ENCODED_LEN {
6023            payload_buf[0..avail_len].copy_from_slice(__input);
6024            Bytes::new(&payload_buf)
6025        } else {
6026            Bytes::new(__input)
6027        };
6028        let mut __struct = Self::default();
6029        __struct.time_boot_us = buf.get_u64_le()?;
6030        for v in &mut __struct.q {
6031            let val = buf.get_f32_le()?;
6032            *v = val;
6033        }
6034        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6035        __struct.vx = buf.get_f32_le()?;
6036        __struct.vy = buf.get_f32_le()?;
6037        __struct.vz = buf.get_f32_le()?;
6038        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6039        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6040        let tmp = buf.get_u16_le()?;
6041        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6042            tmp as <EstimatorStatusFlags as Flags>::Bits,
6043        )
6044        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6045            flag_type: "EstimatorStatusFlags",
6046            value: tmp as u64,
6047        })?;
6048        __struct.target_system = buf.get_u8()?;
6049        __struct.target_component = buf.get_u8()?;
6050        let tmp = buf.get_u8()?;
6051        __struct.landed_state =
6052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6053                enum_type: "MavLandedState",
6054                value: tmp as u64,
6055            })?;
6056        __struct.angular_velocity_z = buf.get_f32_le()?;
6057        Ok(__struct)
6058    }
6059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6060        let mut __tmp = BytesMut::new(bytes);
6061        #[allow(clippy::absurd_extreme_comparisons)]
6062        #[allow(unused_comparisons)]
6063        if __tmp.remaining() < Self::ENCODED_LEN {
6064            panic!(
6065                "buffer is too small (need {} bytes, but got {})",
6066                Self::ENCODED_LEN,
6067                __tmp.remaining(),
6068            )
6069        }
6070        __tmp.put_u64_le(self.time_boot_us);
6071        for val in &self.q {
6072            __tmp.put_f32_le(*val);
6073        }
6074        __tmp.put_u32_le(self.q_estimated_delay_us);
6075        __tmp.put_f32_le(self.vx);
6076        __tmp.put_f32_le(self.vy);
6077        __tmp.put_f32_le(self.vz);
6078        __tmp.put_u32_le(self.v_estimated_delay_us);
6079        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6080        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6081        __tmp.put_u8(self.target_system);
6082        __tmp.put_u8(self.target_component);
6083        __tmp.put_u8(self.landed_state as u8);
6084        if matches!(version, MavlinkVersion::V2) {
6085            __tmp.put_f32_le(self.angular_velocity_z);
6086            let len = __tmp.len();
6087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6088        } else {
6089            __tmp.len()
6090        }
6091    }
6092}
6093#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6094#[doc = ""]
6095#[doc = "ID: 148"]
6096#[derive(Debug, Clone, PartialEq)]
6097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6099#[cfg_attr(feature = "ts", derive(TS))]
6100#[cfg_attr(feature = "ts", ts(export))]
6101pub struct AUTOPILOT_VERSION_DATA {
6102    #[doc = "Bitmap of capabilities"]
6103    pub capabilities: MavProtocolCapability,
6104    #[doc = "UID if provided by hardware (see uid2)"]
6105    pub uid: u64,
6106    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6107    pub flight_sw_version: u32,
6108    #[doc = "Middleware version number"]
6109    pub middleware_sw_version: u32,
6110    #[doc = "Operating system version number"]
6111    pub os_sw_version: u32,
6112    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6113    pub board_version: u32,
6114    #[doc = "ID of the board vendor"]
6115    pub vendor_id: u16,
6116    #[doc = "ID of the product"]
6117    pub product_id: u16,
6118    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6120    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6121    pub flight_custom_version: [u8; 8],
6122    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6125    pub middleware_custom_version: [u8; 8],
6126    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6129    pub os_custom_version: [u8; 8],
6130    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6133    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6134    pub uid2: [u8; 18],
6135}
6136impl AUTOPILOT_VERSION_DATA {
6137    pub const ENCODED_LEN: usize = 78usize;
6138    pub const DEFAULT: Self = Self {
6139        capabilities: MavProtocolCapability::DEFAULT,
6140        uid: 0_u64,
6141        flight_sw_version: 0_u32,
6142        middleware_sw_version: 0_u32,
6143        os_sw_version: 0_u32,
6144        board_version: 0_u32,
6145        vendor_id: 0_u16,
6146        product_id: 0_u16,
6147        flight_custom_version: [0_u8; 8usize],
6148        middleware_custom_version: [0_u8; 8usize],
6149        os_custom_version: [0_u8; 8usize],
6150        uid2: [0_u8; 18usize],
6151    };
6152    #[cfg(feature = "arbitrary")]
6153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6154        use arbitrary::{Arbitrary, Unstructured};
6155        let mut buf = [0u8; 1024];
6156        rng.fill_bytes(&mut buf);
6157        let mut unstructured = Unstructured::new(&buf);
6158        Self::arbitrary(&mut unstructured).unwrap_or_default()
6159    }
6160}
6161impl Default for AUTOPILOT_VERSION_DATA {
6162    fn default() -> Self {
6163        Self::DEFAULT.clone()
6164    }
6165}
6166impl MessageData for AUTOPILOT_VERSION_DATA {
6167    type Message = MavMessage;
6168    const ID: u32 = 148u32;
6169    const NAME: &'static str = "AUTOPILOT_VERSION";
6170    const EXTRA_CRC: u8 = 178u8;
6171    const ENCODED_LEN: usize = 78usize;
6172    fn deser(
6173        _version: MavlinkVersion,
6174        __input: &[u8],
6175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6176        let avail_len = __input.len();
6177        let mut payload_buf = [0; Self::ENCODED_LEN];
6178        let mut buf = if avail_len < Self::ENCODED_LEN {
6179            payload_buf[0..avail_len].copy_from_slice(__input);
6180            Bytes::new(&payload_buf)
6181        } else {
6182            Bytes::new(__input)
6183        };
6184        let mut __struct = Self::default();
6185        let tmp = buf.get_u64_le()?;
6186        __struct.capabilities = MavProtocolCapability::from_bits(
6187            tmp as <MavProtocolCapability as Flags>::Bits,
6188        )
6189        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6190            flag_type: "MavProtocolCapability",
6191            value: tmp as u64,
6192        })?;
6193        __struct.uid = buf.get_u64_le()?;
6194        __struct.flight_sw_version = buf.get_u32_le()?;
6195        __struct.middleware_sw_version = buf.get_u32_le()?;
6196        __struct.os_sw_version = buf.get_u32_le()?;
6197        __struct.board_version = buf.get_u32_le()?;
6198        __struct.vendor_id = buf.get_u16_le()?;
6199        __struct.product_id = buf.get_u16_le()?;
6200        for v in &mut __struct.flight_custom_version {
6201            let val = buf.get_u8()?;
6202            *v = val;
6203        }
6204        for v in &mut __struct.middleware_custom_version {
6205            let val = buf.get_u8()?;
6206            *v = val;
6207        }
6208        for v in &mut __struct.os_custom_version {
6209            let val = buf.get_u8()?;
6210            *v = val;
6211        }
6212        for v in &mut __struct.uid2 {
6213            let val = buf.get_u8()?;
6214            *v = val;
6215        }
6216        Ok(__struct)
6217    }
6218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6219        let mut __tmp = BytesMut::new(bytes);
6220        #[allow(clippy::absurd_extreme_comparisons)]
6221        #[allow(unused_comparisons)]
6222        if __tmp.remaining() < Self::ENCODED_LEN {
6223            panic!(
6224                "buffer is too small (need {} bytes, but got {})",
6225                Self::ENCODED_LEN,
6226                __tmp.remaining(),
6227            )
6228        }
6229        __tmp.put_u64_le(self.capabilities.bits() as u64);
6230        __tmp.put_u64_le(self.uid);
6231        __tmp.put_u32_le(self.flight_sw_version);
6232        __tmp.put_u32_le(self.middleware_sw_version);
6233        __tmp.put_u32_le(self.os_sw_version);
6234        __tmp.put_u32_le(self.board_version);
6235        __tmp.put_u16_le(self.vendor_id);
6236        __tmp.put_u16_le(self.product_id);
6237        for val in &self.flight_custom_version {
6238            __tmp.put_u8(*val);
6239        }
6240        for val in &self.middleware_custom_version {
6241            __tmp.put_u8(*val);
6242        }
6243        for val in &self.os_custom_version {
6244            __tmp.put_u8(*val);
6245        }
6246        if matches!(version, MavlinkVersion::V2) {
6247            for val in &self.uid2 {
6248                __tmp.put_u8(*val);
6249            }
6250            let len = __tmp.len();
6251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6252        } else {
6253            __tmp.len()
6254        }
6255    }
6256}
6257#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6258#[doc = ""]
6259#[doc = "ID: 435"]
6260#[derive(Debug, Clone, PartialEq)]
6261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6263#[cfg_attr(feature = "ts", derive(TS))]
6264#[cfg_attr(feature = "ts", ts(export))]
6265pub struct AVAILABLE_MODES_DATA {
6266    #[doc = "A bitfield for use for autopilot-specific flags"]
6267    pub custom_mode: u32,
6268    #[doc = "Mode properties."]
6269    pub properties: MavModeProperty,
6270    #[doc = "The total number of available modes for the current vehicle type."]
6271    pub number_modes: u8,
6272    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6273    pub mode_index: u8,
6274    #[doc = "Standard mode."]
6275    pub standard_mode: MavStandardMode,
6276    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6277    #[cfg_attr(feature = "ts", ts(type = "string"))]
6278    pub mode_name: CharArray<35>,
6279}
6280impl AVAILABLE_MODES_DATA {
6281    pub const ENCODED_LEN: usize = 46usize;
6282    pub const DEFAULT: Self = Self {
6283        custom_mode: 0_u32,
6284        properties: MavModeProperty::DEFAULT,
6285        number_modes: 0_u8,
6286        mode_index: 0_u8,
6287        standard_mode: MavStandardMode::DEFAULT,
6288        mode_name: CharArray::new([0_u8; 35usize]),
6289    };
6290    #[cfg(feature = "arbitrary")]
6291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6292        use arbitrary::{Arbitrary, Unstructured};
6293        let mut buf = [0u8; 1024];
6294        rng.fill_bytes(&mut buf);
6295        let mut unstructured = Unstructured::new(&buf);
6296        Self::arbitrary(&mut unstructured).unwrap_or_default()
6297    }
6298}
6299impl Default for AVAILABLE_MODES_DATA {
6300    fn default() -> Self {
6301        Self::DEFAULT.clone()
6302    }
6303}
6304impl MessageData for AVAILABLE_MODES_DATA {
6305    type Message = MavMessage;
6306    const ID: u32 = 435u32;
6307    const NAME: &'static str = "AVAILABLE_MODES";
6308    const EXTRA_CRC: u8 = 134u8;
6309    const ENCODED_LEN: usize = 46usize;
6310    fn deser(
6311        _version: MavlinkVersion,
6312        __input: &[u8],
6313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6314        let avail_len = __input.len();
6315        let mut payload_buf = [0; Self::ENCODED_LEN];
6316        let mut buf = if avail_len < Self::ENCODED_LEN {
6317            payload_buf[0..avail_len].copy_from_slice(__input);
6318            Bytes::new(&payload_buf)
6319        } else {
6320            Bytes::new(__input)
6321        };
6322        let mut __struct = Self::default();
6323        __struct.custom_mode = buf.get_u32_le()?;
6324        let tmp = buf.get_u32_le()?;
6325        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6326            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6327            flag_type: "MavModeProperty",
6328            value: tmp as u64,
6329        })?;
6330        __struct.number_modes = buf.get_u8()?;
6331        __struct.mode_index = buf.get_u8()?;
6332        let tmp = buf.get_u8()?;
6333        __struct.standard_mode =
6334            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6335                enum_type: "MavStandardMode",
6336                value: tmp as u64,
6337            })?;
6338        let mut tmp = [0_u8; 35usize];
6339        for v in &mut tmp {
6340            *v = buf.get_u8()?;
6341        }
6342        __struct.mode_name = CharArray::new(tmp);
6343        Ok(__struct)
6344    }
6345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6346        let mut __tmp = BytesMut::new(bytes);
6347        #[allow(clippy::absurd_extreme_comparisons)]
6348        #[allow(unused_comparisons)]
6349        if __tmp.remaining() < Self::ENCODED_LEN {
6350            panic!(
6351                "buffer is too small (need {} bytes, but got {})",
6352                Self::ENCODED_LEN,
6353                __tmp.remaining(),
6354            )
6355        }
6356        __tmp.put_u32_le(self.custom_mode);
6357        __tmp.put_u32_le(self.properties.bits() as u32);
6358        __tmp.put_u8(self.number_modes);
6359        __tmp.put_u8(self.mode_index);
6360        __tmp.put_u8(self.standard_mode as u8);
6361        for val in &self.mode_name {
6362            __tmp.put_u8(*val);
6363        }
6364        if matches!(version, MavlinkVersion::V2) {
6365            let len = __tmp.len();
6366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6367        } else {
6368            __tmp.len()
6369        }
6370    }
6371}
6372#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6373#[doc = ""]
6374#[doc = "ID: 437"]
6375#[derive(Debug, Clone, PartialEq)]
6376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6378#[cfg_attr(feature = "ts", derive(TS))]
6379#[cfg_attr(feature = "ts", ts(export))]
6380pub struct AVAILABLE_MODES_MONITOR_DATA {
6381    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6382    pub seq: u8,
6383}
6384impl AVAILABLE_MODES_MONITOR_DATA {
6385    pub const ENCODED_LEN: usize = 1usize;
6386    pub const DEFAULT: Self = Self { seq: 0_u8 };
6387    #[cfg(feature = "arbitrary")]
6388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6389        use arbitrary::{Arbitrary, Unstructured};
6390        let mut buf = [0u8; 1024];
6391        rng.fill_bytes(&mut buf);
6392        let mut unstructured = Unstructured::new(&buf);
6393        Self::arbitrary(&mut unstructured).unwrap_or_default()
6394    }
6395}
6396impl Default for AVAILABLE_MODES_MONITOR_DATA {
6397    fn default() -> Self {
6398        Self::DEFAULT.clone()
6399    }
6400}
6401impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6402    type Message = MavMessage;
6403    const ID: u32 = 437u32;
6404    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6405    const EXTRA_CRC: u8 = 30u8;
6406    const ENCODED_LEN: usize = 1usize;
6407    fn deser(
6408        _version: MavlinkVersion,
6409        __input: &[u8],
6410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6411        let avail_len = __input.len();
6412        let mut payload_buf = [0; Self::ENCODED_LEN];
6413        let mut buf = if avail_len < Self::ENCODED_LEN {
6414            payload_buf[0..avail_len].copy_from_slice(__input);
6415            Bytes::new(&payload_buf)
6416        } else {
6417            Bytes::new(__input)
6418        };
6419        let mut __struct = Self::default();
6420        __struct.seq = buf.get_u8()?;
6421        Ok(__struct)
6422    }
6423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6424        let mut __tmp = BytesMut::new(bytes);
6425        #[allow(clippy::absurd_extreme_comparisons)]
6426        #[allow(unused_comparisons)]
6427        if __tmp.remaining() < Self::ENCODED_LEN {
6428            panic!(
6429                "buffer is too small (need {} bytes, but got {})",
6430                Self::ENCODED_LEN,
6431                __tmp.remaining(),
6432            )
6433        }
6434        __tmp.put_u8(self.seq);
6435        if matches!(version, MavlinkVersion::V2) {
6436            let len = __tmp.len();
6437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6438        } else {
6439            __tmp.len()
6440        }
6441    }
6442}
6443#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6444#[doc = ""]
6445#[doc = "ID: 372"]
6446#[derive(Debug, Clone, PartialEq)]
6447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6449#[cfg_attr(feature = "ts", derive(TS))]
6450#[cfg_attr(feature = "ts", ts(export))]
6451pub struct BATTERY_INFO_DATA {
6452    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6453    pub discharge_minimum_voltage: f32,
6454    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6455    pub charging_minimum_voltage: f32,
6456    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6457    pub resting_minimum_voltage: f32,
6458    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6459    pub charging_maximum_voltage: f32,
6460    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6461    pub charging_maximum_current: f32,
6462    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6463    pub nominal_voltage: f32,
6464    #[doc = "Maximum pack discharge current. 0: field not provided."]
6465    pub discharge_maximum_current: f32,
6466    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6467    pub discharge_maximum_burst_current: f32,
6468    #[doc = "Fully charged design capacity. 0: field not provided."]
6469    pub design_capacity: f32,
6470    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6471    pub full_charge_capacity: f32,
6472    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6473    pub cycle_count: u16,
6474    #[doc = "Battery weight. 0: field not provided."]
6475    pub weight: u16,
6476    #[doc = "Battery ID"]
6477    pub id: u8,
6478    #[doc = "Function of the battery."]
6479    pub battery_function: MavBatteryFunction,
6480    #[doc = "Type (chemistry) of the battery."]
6481    pub mavtype: MavBatteryType,
6482    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6483    pub state_of_health: u8,
6484    #[doc = "Number of battery cells in series. 0: field not provided."]
6485    pub cells_in_series: u8,
6486    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6487    #[cfg_attr(feature = "ts", ts(type = "string"))]
6488    pub manufacture_date: CharArray<9>,
6489    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6490    #[cfg_attr(feature = "ts", ts(type = "string"))]
6491    pub serial_number: CharArray<32>,
6492    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6493    #[cfg_attr(feature = "ts", ts(type = "string"))]
6494    pub name: CharArray<50>,
6495}
6496impl BATTERY_INFO_DATA {
6497    pub const ENCODED_LEN: usize = 140usize;
6498    pub const DEFAULT: Self = Self {
6499        discharge_minimum_voltage: 0.0_f32,
6500        charging_minimum_voltage: 0.0_f32,
6501        resting_minimum_voltage: 0.0_f32,
6502        charging_maximum_voltage: 0.0_f32,
6503        charging_maximum_current: 0.0_f32,
6504        nominal_voltage: 0.0_f32,
6505        discharge_maximum_current: 0.0_f32,
6506        discharge_maximum_burst_current: 0.0_f32,
6507        design_capacity: 0.0_f32,
6508        full_charge_capacity: 0.0_f32,
6509        cycle_count: 0_u16,
6510        weight: 0_u16,
6511        id: 0_u8,
6512        battery_function: MavBatteryFunction::DEFAULT,
6513        mavtype: MavBatteryType::DEFAULT,
6514        state_of_health: 0_u8,
6515        cells_in_series: 0_u8,
6516        manufacture_date: CharArray::new([0_u8; 9usize]),
6517        serial_number: CharArray::new([0_u8; 32usize]),
6518        name: CharArray::new([0_u8; 50usize]),
6519    };
6520    #[cfg(feature = "arbitrary")]
6521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6522        use arbitrary::{Arbitrary, Unstructured};
6523        let mut buf = [0u8; 1024];
6524        rng.fill_bytes(&mut buf);
6525        let mut unstructured = Unstructured::new(&buf);
6526        Self::arbitrary(&mut unstructured).unwrap_or_default()
6527    }
6528}
6529impl Default for BATTERY_INFO_DATA {
6530    fn default() -> Self {
6531        Self::DEFAULT.clone()
6532    }
6533}
6534impl MessageData for BATTERY_INFO_DATA {
6535    type Message = MavMessage;
6536    const ID: u32 = 372u32;
6537    const NAME: &'static str = "BATTERY_INFO";
6538    const EXTRA_CRC: u8 = 26u8;
6539    const ENCODED_LEN: usize = 140usize;
6540    fn deser(
6541        _version: MavlinkVersion,
6542        __input: &[u8],
6543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6544        let avail_len = __input.len();
6545        let mut payload_buf = [0; Self::ENCODED_LEN];
6546        let mut buf = if avail_len < Self::ENCODED_LEN {
6547            payload_buf[0..avail_len].copy_from_slice(__input);
6548            Bytes::new(&payload_buf)
6549        } else {
6550            Bytes::new(__input)
6551        };
6552        let mut __struct = Self::default();
6553        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
6554        __struct.charging_minimum_voltage = buf.get_f32_le()?;
6555        __struct.resting_minimum_voltage = buf.get_f32_le()?;
6556        __struct.charging_maximum_voltage = buf.get_f32_le()?;
6557        __struct.charging_maximum_current = buf.get_f32_le()?;
6558        __struct.nominal_voltage = buf.get_f32_le()?;
6559        __struct.discharge_maximum_current = buf.get_f32_le()?;
6560        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
6561        __struct.design_capacity = buf.get_f32_le()?;
6562        __struct.full_charge_capacity = buf.get_f32_le()?;
6563        __struct.cycle_count = buf.get_u16_le()?;
6564        __struct.weight = buf.get_u16_le()?;
6565        __struct.id = buf.get_u8()?;
6566        let tmp = buf.get_u8()?;
6567        __struct.battery_function =
6568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6569                enum_type: "MavBatteryFunction",
6570                value: tmp as u64,
6571            })?;
6572        let tmp = buf.get_u8()?;
6573        __struct.mavtype =
6574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6575                enum_type: "MavBatteryType",
6576                value: tmp as u64,
6577            })?;
6578        __struct.state_of_health = buf.get_u8()?;
6579        __struct.cells_in_series = buf.get_u8()?;
6580        let mut tmp = [0_u8; 9usize];
6581        for v in &mut tmp {
6582            *v = buf.get_u8()?;
6583        }
6584        __struct.manufacture_date = CharArray::new(tmp);
6585        let mut tmp = [0_u8; 32usize];
6586        for v in &mut tmp {
6587            *v = buf.get_u8()?;
6588        }
6589        __struct.serial_number = CharArray::new(tmp);
6590        let mut tmp = [0_u8; 50usize];
6591        for v in &mut tmp {
6592            *v = buf.get_u8()?;
6593        }
6594        __struct.name = CharArray::new(tmp);
6595        Ok(__struct)
6596    }
6597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6598        let mut __tmp = BytesMut::new(bytes);
6599        #[allow(clippy::absurd_extreme_comparisons)]
6600        #[allow(unused_comparisons)]
6601        if __tmp.remaining() < Self::ENCODED_LEN {
6602            panic!(
6603                "buffer is too small (need {} bytes, but got {})",
6604                Self::ENCODED_LEN,
6605                __tmp.remaining(),
6606            )
6607        }
6608        __tmp.put_f32_le(self.discharge_minimum_voltage);
6609        __tmp.put_f32_le(self.charging_minimum_voltage);
6610        __tmp.put_f32_le(self.resting_minimum_voltage);
6611        __tmp.put_f32_le(self.charging_maximum_voltage);
6612        __tmp.put_f32_le(self.charging_maximum_current);
6613        __tmp.put_f32_le(self.nominal_voltage);
6614        __tmp.put_f32_le(self.discharge_maximum_current);
6615        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6616        __tmp.put_f32_le(self.design_capacity);
6617        __tmp.put_f32_le(self.full_charge_capacity);
6618        __tmp.put_u16_le(self.cycle_count);
6619        __tmp.put_u16_le(self.weight);
6620        __tmp.put_u8(self.id);
6621        __tmp.put_u8(self.battery_function as u8);
6622        __tmp.put_u8(self.mavtype as u8);
6623        __tmp.put_u8(self.state_of_health);
6624        __tmp.put_u8(self.cells_in_series);
6625        for val in &self.manufacture_date {
6626            __tmp.put_u8(*val);
6627        }
6628        for val in &self.serial_number {
6629            __tmp.put_u8(*val);
6630        }
6631        for val in &self.name {
6632            __tmp.put_u8(*val);
6633        }
6634        if matches!(version, MavlinkVersion::V2) {
6635            let len = __tmp.len();
6636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6637        } else {
6638            __tmp.len()
6639        }
6640    }
6641}
6642#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6643#[doc = ""]
6644#[doc = "ID: 147"]
6645#[derive(Debug, Clone, PartialEq)]
6646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6648#[cfg_attr(feature = "ts", derive(TS))]
6649#[cfg_attr(feature = "ts", ts(export))]
6650pub struct BATTERY_STATUS_DATA {
6651    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6652    pub current_consumed: i32,
6653    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6654    pub energy_consumed: i32,
6655    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6656    pub temperature: i16,
6657    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6660    pub voltages: [u16; 10],
6661    #[doc = "Battery current, -1: autopilot does not measure the current"]
6662    pub current_battery: i16,
6663    #[doc = "Battery ID"]
6664    pub id: u8,
6665    #[doc = "Function of the battery"]
6666    pub battery_function: MavBatteryFunction,
6667    #[doc = "Type (chemistry) of the battery"]
6668    pub mavtype: MavBatteryType,
6669    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6670    pub battery_remaining: i8,
6671    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6673    pub time_remaining: i32,
6674    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6675    #[cfg_attr(feature = "serde", serde(default))]
6676    pub charge_state: MavBatteryChargeState,
6677    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6678    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6681    pub voltages_ext: [u16; 4],
6682    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6683    #[cfg_attr(feature = "serde", serde(default))]
6684    pub mode: MavBatteryMode,
6685    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6686    #[cfg_attr(feature = "serde", serde(default))]
6687    pub fault_bitmask: MavBatteryFault,
6688}
6689impl BATTERY_STATUS_DATA {
6690    pub const ENCODED_LEN: usize = 54usize;
6691    pub const DEFAULT: Self = Self {
6692        current_consumed: 0_i32,
6693        energy_consumed: 0_i32,
6694        temperature: 0_i16,
6695        voltages: [0_u16; 10usize],
6696        current_battery: 0_i16,
6697        id: 0_u8,
6698        battery_function: MavBatteryFunction::DEFAULT,
6699        mavtype: MavBatteryType::DEFAULT,
6700        battery_remaining: 0_i8,
6701        time_remaining: 0_i32,
6702        charge_state: MavBatteryChargeState::DEFAULT,
6703        voltages_ext: [0_u16; 4usize],
6704        mode: MavBatteryMode::DEFAULT,
6705        fault_bitmask: MavBatteryFault::DEFAULT,
6706    };
6707    #[cfg(feature = "arbitrary")]
6708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6709        use arbitrary::{Arbitrary, Unstructured};
6710        let mut buf = [0u8; 1024];
6711        rng.fill_bytes(&mut buf);
6712        let mut unstructured = Unstructured::new(&buf);
6713        Self::arbitrary(&mut unstructured).unwrap_or_default()
6714    }
6715}
6716impl Default for BATTERY_STATUS_DATA {
6717    fn default() -> Self {
6718        Self::DEFAULT.clone()
6719    }
6720}
6721impl MessageData for BATTERY_STATUS_DATA {
6722    type Message = MavMessage;
6723    const ID: u32 = 147u32;
6724    const NAME: &'static str = "BATTERY_STATUS";
6725    const EXTRA_CRC: u8 = 154u8;
6726    const ENCODED_LEN: usize = 54usize;
6727    fn deser(
6728        _version: MavlinkVersion,
6729        __input: &[u8],
6730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6731        let avail_len = __input.len();
6732        let mut payload_buf = [0; Self::ENCODED_LEN];
6733        let mut buf = if avail_len < Self::ENCODED_LEN {
6734            payload_buf[0..avail_len].copy_from_slice(__input);
6735            Bytes::new(&payload_buf)
6736        } else {
6737            Bytes::new(__input)
6738        };
6739        let mut __struct = Self::default();
6740        __struct.current_consumed = buf.get_i32_le()?;
6741        __struct.energy_consumed = buf.get_i32_le()?;
6742        __struct.temperature = buf.get_i16_le()?;
6743        for v in &mut __struct.voltages {
6744            let val = buf.get_u16_le()?;
6745            *v = val;
6746        }
6747        __struct.current_battery = buf.get_i16_le()?;
6748        __struct.id = buf.get_u8()?;
6749        let tmp = buf.get_u8()?;
6750        __struct.battery_function =
6751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6752                enum_type: "MavBatteryFunction",
6753                value: tmp as u64,
6754            })?;
6755        let tmp = buf.get_u8()?;
6756        __struct.mavtype =
6757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6758                enum_type: "MavBatteryType",
6759                value: tmp as u64,
6760            })?;
6761        __struct.battery_remaining = buf.get_i8()?;
6762        __struct.time_remaining = buf.get_i32_le()?;
6763        let tmp = buf.get_u8()?;
6764        __struct.charge_state =
6765            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6766                enum_type: "MavBatteryChargeState",
6767                value: tmp as u64,
6768            })?;
6769        for v in &mut __struct.voltages_ext {
6770            let val = buf.get_u16_le()?;
6771            *v = val;
6772        }
6773        let tmp = buf.get_u8()?;
6774        __struct.mode =
6775            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6776                enum_type: "MavBatteryMode",
6777                value: tmp as u64,
6778            })?;
6779        let tmp = buf.get_u32_le()?;
6780        __struct.fault_bitmask = MavBatteryFault::from_bits(
6781            tmp as <MavBatteryFault as Flags>::Bits,
6782        )
6783        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6784            flag_type: "MavBatteryFault",
6785            value: tmp as u64,
6786        })?;
6787        Ok(__struct)
6788    }
6789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6790        let mut __tmp = BytesMut::new(bytes);
6791        #[allow(clippy::absurd_extreme_comparisons)]
6792        #[allow(unused_comparisons)]
6793        if __tmp.remaining() < Self::ENCODED_LEN {
6794            panic!(
6795                "buffer is too small (need {} bytes, but got {})",
6796                Self::ENCODED_LEN,
6797                __tmp.remaining(),
6798            )
6799        }
6800        __tmp.put_i32_le(self.current_consumed);
6801        __tmp.put_i32_le(self.energy_consumed);
6802        __tmp.put_i16_le(self.temperature);
6803        for val in &self.voltages {
6804            __tmp.put_u16_le(*val);
6805        }
6806        __tmp.put_i16_le(self.current_battery);
6807        __tmp.put_u8(self.id);
6808        __tmp.put_u8(self.battery_function as u8);
6809        __tmp.put_u8(self.mavtype as u8);
6810        __tmp.put_i8(self.battery_remaining);
6811        if matches!(version, MavlinkVersion::V2) {
6812            __tmp.put_i32_le(self.time_remaining);
6813            __tmp.put_u8(self.charge_state as u8);
6814            for val in &self.voltages_ext {
6815                __tmp.put_u16_le(*val);
6816            }
6817            __tmp.put_u8(self.mode as u8);
6818            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
6819            let len = __tmp.len();
6820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6821        } else {
6822            __tmp.len()
6823        }
6824    }
6825}
6826#[doc = "Report button state change."]
6827#[doc = ""]
6828#[doc = "ID: 257"]
6829#[derive(Debug, Clone, PartialEq)]
6830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6832#[cfg_attr(feature = "ts", derive(TS))]
6833#[cfg_attr(feature = "ts", ts(export))]
6834pub struct BUTTON_CHANGE_DATA {
6835    #[doc = "Timestamp (time since system boot)."]
6836    pub time_boot_ms: u32,
6837    #[doc = "Time of last change of button state."]
6838    pub last_change_ms: u32,
6839    #[doc = "Bitmap for state of buttons."]
6840    pub state: u8,
6841}
6842impl BUTTON_CHANGE_DATA {
6843    pub const ENCODED_LEN: usize = 9usize;
6844    pub const DEFAULT: Self = Self {
6845        time_boot_ms: 0_u32,
6846        last_change_ms: 0_u32,
6847        state: 0_u8,
6848    };
6849    #[cfg(feature = "arbitrary")]
6850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6851        use arbitrary::{Arbitrary, Unstructured};
6852        let mut buf = [0u8; 1024];
6853        rng.fill_bytes(&mut buf);
6854        let mut unstructured = Unstructured::new(&buf);
6855        Self::arbitrary(&mut unstructured).unwrap_or_default()
6856    }
6857}
6858impl Default for BUTTON_CHANGE_DATA {
6859    fn default() -> Self {
6860        Self::DEFAULT.clone()
6861    }
6862}
6863impl MessageData for BUTTON_CHANGE_DATA {
6864    type Message = MavMessage;
6865    const ID: u32 = 257u32;
6866    const NAME: &'static str = "BUTTON_CHANGE";
6867    const EXTRA_CRC: u8 = 131u8;
6868    const ENCODED_LEN: usize = 9usize;
6869    fn deser(
6870        _version: MavlinkVersion,
6871        __input: &[u8],
6872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6873        let avail_len = __input.len();
6874        let mut payload_buf = [0; Self::ENCODED_LEN];
6875        let mut buf = if avail_len < Self::ENCODED_LEN {
6876            payload_buf[0..avail_len].copy_from_slice(__input);
6877            Bytes::new(&payload_buf)
6878        } else {
6879            Bytes::new(__input)
6880        };
6881        let mut __struct = Self::default();
6882        __struct.time_boot_ms = buf.get_u32_le()?;
6883        __struct.last_change_ms = buf.get_u32_le()?;
6884        __struct.state = buf.get_u8()?;
6885        Ok(__struct)
6886    }
6887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6888        let mut __tmp = BytesMut::new(bytes);
6889        #[allow(clippy::absurd_extreme_comparisons)]
6890        #[allow(unused_comparisons)]
6891        if __tmp.remaining() < Self::ENCODED_LEN {
6892            panic!(
6893                "buffer is too small (need {} bytes, but got {})",
6894                Self::ENCODED_LEN,
6895                __tmp.remaining(),
6896            )
6897        }
6898        __tmp.put_u32_le(self.time_boot_ms);
6899        __tmp.put_u32_le(self.last_change_ms);
6900        __tmp.put_u8(self.state);
6901        if matches!(version, MavlinkVersion::V2) {
6902            let len = __tmp.len();
6903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6904        } else {
6905            __tmp.len()
6906        }
6907    }
6908}
6909#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6910#[doc = ""]
6911#[doc = "ID: 262"]
6912#[derive(Debug, Clone, PartialEq)]
6913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6915#[cfg_attr(feature = "ts", derive(TS))]
6916#[cfg_attr(feature = "ts", ts(export))]
6917pub struct CAMERA_CAPTURE_STATUS_DATA {
6918    #[doc = "Timestamp (time since system boot)."]
6919    pub time_boot_ms: u32,
6920    #[doc = "Image capture interval"]
6921    pub image_interval: f32,
6922    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6923    pub recording_time_ms: u32,
6924    #[doc = "Available storage capacity."]
6925    pub available_capacity: f32,
6926    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6927    pub image_status: u8,
6928    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6929    pub video_status: u8,
6930    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6932    pub image_count: i32,
6933    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6935    pub camera_device_id: u8,
6936}
6937impl CAMERA_CAPTURE_STATUS_DATA {
6938    pub const ENCODED_LEN: usize = 23usize;
6939    pub const DEFAULT: Self = Self {
6940        time_boot_ms: 0_u32,
6941        image_interval: 0.0_f32,
6942        recording_time_ms: 0_u32,
6943        available_capacity: 0.0_f32,
6944        image_status: 0_u8,
6945        video_status: 0_u8,
6946        image_count: 0_i32,
6947        camera_device_id: 0_u8,
6948    };
6949    #[cfg(feature = "arbitrary")]
6950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6951        use arbitrary::{Arbitrary, Unstructured};
6952        let mut buf = [0u8; 1024];
6953        rng.fill_bytes(&mut buf);
6954        let mut unstructured = Unstructured::new(&buf);
6955        Self::arbitrary(&mut unstructured).unwrap_or_default()
6956    }
6957}
6958impl Default for CAMERA_CAPTURE_STATUS_DATA {
6959    fn default() -> Self {
6960        Self::DEFAULT.clone()
6961    }
6962}
6963impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6964    type Message = MavMessage;
6965    const ID: u32 = 262u32;
6966    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6967    const EXTRA_CRC: u8 = 12u8;
6968    const ENCODED_LEN: usize = 23usize;
6969    fn deser(
6970        _version: MavlinkVersion,
6971        __input: &[u8],
6972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6973        let avail_len = __input.len();
6974        let mut payload_buf = [0; Self::ENCODED_LEN];
6975        let mut buf = if avail_len < Self::ENCODED_LEN {
6976            payload_buf[0..avail_len].copy_from_slice(__input);
6977            Bytes::new(&payload_buf)
6978        } else {
6979            Bytes::new(__input)
6980        };
6981        let mut __struct = Self::default();
6982        __struct.time_boot_ms = buf.get_u32_le()?;
6983        __struct.image_interval = buf.get_f32_le()?;
6984        __struct.recording_time_ms = buf.get_u32_le()?;
6985        __struct.available_capacity = buf.get_f32_le()?;
6986        __struct.image_status = buf.get_u8()?;
6987        __struct.video_status = buf.get_u8()?;
6988        __struct.image_count = buf.get_i32_le()?;
6989        __struct.camera_device_id = buf.get_u8()?;
6990        Ok(__struct)
6991    }
6992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6993        let mut __tmp = BytesMut::new(bytes);
6994        #[allow(clippy::absurd_extreme_comparisons)]
6995        #[allow(unused_comparisons)]
6996        if __tmp.remaining() < Self::ENCODED_LEN {
6997            panic!(
6998                "buffer is too small (need {} bytes, but got {})",
6999                Self::ENCODED_LEN,
7000                __tmp.remaining(),
7001            )
7002        }
7003        __tmp.put_u32_le(self.time_boot_ms);
7004        __tmp.put_f32_le(self.image_interval);
7005        __tmp.put_u32_le(self.recording_time_ms);
7006        __tmp.put_f32_le(self.available_capacity);
7007        __tmp.put_u8(self.image_status);
7008        __tmp.put_u8(self.video_status);
7009        if matches!(version, MavlinkVersion::V2) {
7010            __tmp.put_i32_le(self.image_count);
7011            __tmp.put_u8(self.camera_device_id);
7012            let len = __tmp.len();
7013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7014        } else {
7015            __tmp.len()
7016        }
7017    }
7018}
7019#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7020#[doc = ""]
7021#[doc = "ID: 271"]
7022#[derive(Debug, Clone, PartialEq)]
7023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7025#[cfg_attr(feature = "ts", derive(TS))]
7026#[cfg_attr(feature = "ts", ts(export))]
7027pub struct CAMERA_FOV_STATUS_DATA {
7028    #[doc = "Timestamp (time since system boot)."]
7029    pub time_boot_ms: u32,
7030    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7031    pub lat_camera: i32,
7032    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7033    pub lon_camera: i32,
7034    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7035    pub alt_camera: i32,
7036    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7037    pub lat_image: i32,
7038    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7039    pub lon_image: i32,
7040    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7041    pub alt_image: i32,
7042    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7043    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7044    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7045    pub q: [f32; 4],
7046    #[doc = "Horizontal field of view (NaN if unknown)."]
7047    pub hfov: f32,
7048    #[doc = "Vertical field of view (NaN if unknown)."]
7049    pub vfov: f32,
7050    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7051    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7052    pub camera_device_id: u8,
7053}
7054impl CAMERA_FOV_STATUS_DATA {
7055    pub const ENCODED_LEN: usize = 53usize;
7056    pub const DEFAULT: Self = Self {
7057        time_boot_ms: 0_u32,
7058        lat_camera: 0_i32,
7059        lon_camera: 0_i32,
7060        alt_camera: 0_i32,
7061        lat_image: 0_i32,
7062        lon_image: 0_i32,
7063        alt_image: 0_i32,
7064        q: [0.0_f32; 4usize],
7065        hfov: 0.0_f32,
7066        vfov: 0.0_f32,
7067        camera_device_id: 0_u8,
7068    };
7069    #[cfg(feature = "arbitrary")]
7070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7071        use arbitrary::{Arbitrary, Unstructured};
7072        let mut buf = [0u8; 1024];
7073        rng.fill_bytes(&mut buf);
7074        let mut unstructured = Unstructured::new(&buf);
7075        Self::arbitrary(&mut unstructured).unwrap_or_default()
7076    }
7077}
7078impl Default for CAMERA_FOV_STATUS_DATA {
7079    fn default() -> Self {
7080        Self::DEFAULT.clone()
7081    }
7082}
7083impl MessageData for CAMERA_FOV_STATUS_DATA {
7084    type Message = MavMessage;
7085    const ID: u32 = 271u32;
7086    const NAME: &'static str = "CAMERA_FOV_STATUS";
7087    const EXTRA_CRC: u8 = 22u8;
7088    const ENCODED_LEN: usize = 53usize;
7089    fn deser(
7090        _version: MavlinkVersion,
7091        __input: &[u8],
7092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7093        let avail_len = __input.len();
7094        let mut payload_buf = [0; Self::ENCODED_LEN];
7095        let mut buf = if avail_len < Self::ENCODED_LEN {
7096            payload_buf[0..avail_len].copy_from_slice(__input);
7097            Bytes::new(&payload_buf)
7098        } else {
7099            Bytes::new(__input)
7100        };
7101        let mut __struct = Self::default();
7102        __struct.time_boot_ms = buf.get_u32_le()?;
7103        __struct.lat_camera = buf.get_i32_le()?;
7104        __struct.lon_camera = buf.get_i32_le()?;
7105        __struct.alt_camera = buf.get_i32_le()?;
7106        __struct.lat_image = buf.get_i32_le()?;
7107        __struct.lon_image = buf.get_i32_le()?;
7108        __struct.alt_image = buf.get_i32_le()?;
7109        for v in &mut __struct.q {
7110            let val = buf.get_f32_le()?;
7111            *v = val;
7112        }
7113        __struct.hfov = buf.get_f32_le()?;
7114        __struct.vfov = buf.get_f32_le()?;
7115        __struct.camera_device_id = buf.get_u8()?;
7116        Ok(__struct)
7117    }
7118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7119        let mut __tmp = BytesMut::new(bytes);
7120        #[allow(clippy::absurd_extreme_comparisons)]
7121        #[allow(unused_comparisons)]
7122        if __tmp.remaining() < Self::ENCODED_LEN {
7123            panic!(
7124                "buffer is too small (need {} bytes, but got {})",
7125                Self::ENCODED_LEN,
7126                __tmp.remaining(),
7127            )
7128        }
7129        __tmp.put_u32_le(self.time_boot_ms);
7130        __tmp.put_i32_le(self.lat_camera);
7131        __tmp.put_i32_le(self.lon_camera);
7132        __tmp.put_i32_le(self.alt_camera);
7133        __tmp.put_i32_le(self.lat_image);
7134        __tmp.put_i32_le(self.lon_image);
7135        __tmp.put_i32_le(self.alt_image);
7136        for val in &self.q {
7137            __tmp.put_f32_le(*val);
7138        }
7139        __tmp.put_f32_le(self.hfov);
7140        __tmp.put_f32_le(self.vfov);
7141        if matches!(version, MavlinkVersion::V2) {
7142            __tmp.put_u8(self.camera_device_id);
7143            let len = __tmp.len();
7144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7145        } else {
7146            __tmp.len()
7147        }
7148    }
7149}
7150#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7151#[doc = ""]
7152#[doc = "ID: 263"]
7153#[derive(Debug, Clone, PartialEq)]
7154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7156#[cfg_attr(feature = "ts", derive(TS))]
7157#[cfg_attr(feature = "ts", ts(export))]
7158pub struct CAMERA_IMAGE_CAPTURED_DATA {
7159    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7160    pub time_utc: u64,
7161    #[doc = "Timestamp (time since system boot)."]
7162    pub time_boot_ms: u32,
7163    #[doc = "Latitude where image was taken"]
7164    pub lat: i32,
7165    #[doc = "Longitude where capture was taken"]
7166    pub lon: i32,
7167    #[doc = "Altitude (MSL) where image was taken"]
7168    pub alt: i32,
7169    #[doc = "Altitude above ground"]
7170    pub relative_alt: i32,
7171    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7173    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7174    pub q: [f32; 4],
7175    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7176    pub image_index: i32,
7177    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7178    pub camera_id: u8,
7179    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7180    pub capture_result: i8,
7181    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7182    #[cfg_attr(feature = "ts", ts(type = "string"))]
7183    pub file_url: CharArray<205>,
7184}
7185impl CAMERA_IMAGE_CAPTURED_DATA {
7186    pub const ENCODED_LEN: usize = 255usize;
7187    pub const DEFAULT: Self = Self {
7188        time_utc: 0_u64,
7189        time_boot_ms: 0_u32,
7190        lat: 0_i32,
7191        lon: 0_i32,
7192        alt: 0_i32,
7193        relative_alt: 0_i32,
7194        q: [0.0_f32; 4usize],
7195        image_index: 0_i32,
7196        camera_id: 0_u8,
7197        capture_result: 0_i8,
7198        file_url: CharArray::new([0_u8; 205usize]),
7199    };
7200    #[cfg(feature = "arbitrary")]
7201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7202        use arbitrary::{Arbitrary, Unstructured};
7203        let mut buf = [0u8; 1024];
7204        rng.fill_bytes(&mut buf);
7205        let mut unstructured = Unstructured::new(&buf);
7206        Self::arbitrary(&mut unstructured).unwrap_or_default()
7207    }
7208}
7209impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7210    fn default() -> Self {
7211        Self::DEFAULT.clone()
7212    }
7213}
7214impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7215    type Message = MavMessage;
7216    const ID: u32 = 263u32;
7217    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7218    const EXTRA_CRC: u8 = 133u8;
7219    const ENCODED_LEN: usize = 255usize;
7220    fn deser(
7221        _version: MavlinkVersion,
7222        __input: &[u8],
7223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7224        let avail_len = __input.len();
7225        let mut payload_buf = [0; Self::ENCODED_LEN];
7226        let mut buf = if avail_len < Self::ENCODED_LEN {
7227            payload_buf[0..avail_len].copy_from_slice(__input);
7228            Bytes::new(&payload_buf)
7229        } else {
7230            Bytes::new(__input)
7231        };
7232        let mut __struct = Self::default();
7233        __struct.time_utc = buf.get_u64_le()?;
7234        __struct.time_boot_ms = buf.get_u32_le()?;
7235        __struct.lat = buf.get_i32_le()?;
7236        __struct.lon = buf.get_i32_le()?;
7237        __struct.alt = buf.get_i32_le()?;
7238        __struct.relative_alt = buf.get_i32_le()?;
7239        for v in &mut __struct.q {
7240            let val = buf.get_f32_le()?;
7241            *v = val;
7242        }
7243        __struct.image_index = buf.get_i32_le()?;
7244        __struct.camera_id = buf.get_u8()?;
7245        __struct.capture_result = buf.get_i8()?;
7246        let mut tmp = [0_u8; 205usize];
7247        for v in &mut tmp {
7248            *v = buf.get_u8()?;
7249        }
7250        __struct.file_url = CharArray::new(tmp);
7251        Ok(__struct)
7252    }
7253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7254        let mut __tmp = BytesMut::new(bytes);
7255        #[allow(clippy::absurd_extreme_comparisons)]
7256        #[allow(unused_comparisons)]
7257        if __tmp.remaining() < Self::ENCODED_LEN {
7258            panic!(
7259                "buffer is too small (need {} bytes, but got {})",
7260                Self::ENCODED_LEN,
7261                __tmp.remaining(),
7262            )
7263        }
7264        __tmp.put_u64_le(self.time_utc);
7265        __tmp.put_u32_le(self.time_boot_ms);
7266        __tmp.put_i32_le(self.lat);
7267        __tmp.put_i32_le(self.lon);
7268        __tmp.put_i32_le(self.alt);
7269        __tmp.put_i32_le(self.relative_alt);
7270        for val in &self.q {
7271            __tmp.put_f32_le(*val);
7272        }
7273        __tmp.put_i32_le(self.image_index);
7274        __tmp.put_u8(self.camera_id);
7275        __tmp.put_i8(self.capture_result);
7276        for val in &self.file_url {
7277            __tmp.put_u8(*val);
7278        }
7279        if matches!(version, MavlinkVersion::V2) {
7280            let len = __tmp.len();
7281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7282        } else {
7283            __tmp.len()
7284        }
7285    }
7286}
7287#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7288#[doc = ""]
7289#[doc = "ID: 259"]
7290#[derive(Debug, Clone, PartialEq)]
7291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7293#[cfg_attr(feature = "ts", derive(TS))]
7294#[cfg_attr(feature = "ts", ts(export))]
7295pub struct CAMERA_INFORMATION_DATA {
7296    #[doc = "Timestamp (time since system boot)."]
7297    pub time_boot_ms: u32,
7298    #[doc = "0xff). Use 0 if not known."]
7299    pub firmware_version: u32,
7300    #[doc = "Focal length. Use NaN if not known."]
7301    pub focal_length: f32,
7302    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7303    pub sensor_size_h: f32,
7304    #[doc = "Image sensor size vertical. Use NaN if not known."]
7305    pub sensor_size_v: f32,
7306    #[doc = "Bitmap of camera capability flags."]
7307    pub flags: CameraCapFlags,
7308    #[doc = "Horizontal image resolution. Use 0 if not known."]
7309    pub resolution_h: u16,
7310    #[doc = "Vertical image resolution. Use 0 if not known."]
7311    pub resolution_v: u16,
7312    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7313    pub cam_definition_version: u16,
7314    #[doc = "Name of the camera vendor"]
7315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7317    pub vendor_name: [u8; 32],
7318    #[doc = "Name of the camera model"]
7319    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7320    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7321    pub model_name: [u8; 32],
7322    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7323    pub lens_id: u8,
7324    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7325    #[cfg_attr(feature = "ts", ts(type = "string"))]
7326    pub cam_definition_uri: CharArray<140>,
7327    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7329    pub gimbal_device_id: u8,
7330    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7332    pub camera_device_id: u8,
7333}
7334impl CAMERA_INFORMATION_DATA {
7335    pub const ENCODED_LEN: usize = 237usize;
7336    pub const DEFAULT: Self = Self {
7337        time_boot_ms: 0_u32,
7338        firmware_version: 0_u32,
7339        focal_length: 0.0_f32,
7340        sensor_size_h: 0.0_f32,
7341        sensor_size_v: 0.0_f32,
7342        flags: CameraCapFlags::DEFAULT,
7343        resolution_h: 0_u16,
7344        resolution_v: 0_u16,
7345        cam_definition_version: 0_u16,
7346        vendor_name: [0_u8; 32usize],
7347        model_name: [0_u8; 32usize],
7348        lens_id: 0_u8,
7349        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7350        gimbal_device_id: 0_u8,
7351        camera_device_id: 0_u8,
7352    };
7353    #[cfg(feature = "arbitrary")]
7354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7355        use arbitrary::{Arbitrary, Unstructured};
7356        let mut buf = [0u8; 1024];
7357        rng.fill_bytes(&mut buf);
7358        let mut unstructured = Unstructured::new(&buf);
7359        Self::arbitrary(&mut unstructured).unwrap_or_default()
7360    }
7361}
7362impl Default for CAMERA_INFORMATION_DATA {
7363    fn default() -> Self {
7364        Self::DEFAULT.clone()
7365    }
7366}
7367impl MessageData for CAMERA_INFORMATION_DATA {
7368    type Message = MavMessage;
7369    const ID: u32 = 259u32;
7370    const NAME: &'static str = "CAMERA_INFORMATION";
7371    const EXTRA_CRC: u8 = 92u8;
7372    const ENCODED_LEN: usize = 237usize;
7373    fn deser(
7374        _version: MavlinkVersion,
7375        __input: &[u8],
7376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7377        let avail_len = __input.len();
7378        let mut payload_buf = [0; Self::ENCODED_LEN];
7379        let mut buf = if avail_len < Self::ENCODED_LEN {
7380            payload_buf[0..avail_len].copy_from_slice(__input);
7381            Bytes::new(&payload_buf)
7382        } else {
7383            Bytes::new(__input)
7384        };
7385        let mut __struct = Self::default();
7386        __struct.time_boot_ms = buf.get_u32_le()?;
7387        __struct.firmware_version = buf.get_u32_le()?;
7388        __struct.focal_length = buf.get_f32_le()?;
7389        __struct.sensor_size_h = buf.get_f32_le()?;
7390        __struct.sensor_size_v = buf.get_f32_le()?;
7391        let tmp = buf.get_u32_le()?;
7392        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7393            ::mavlink_core::error::ParserError::InvalidFlag {
7394                flag_type: "CameraCapFlags",
7395                value: tmp as u64,
7396            },
7397        )?;
7398        __struct.resolution_h = buf.get_u16_le()?;
7399        __struct.resolution_v = buf.get_u16_le()?;
7400        __struct.cam_definition_version = buf.get_u16_le()?;
7401        for v in &mut __struct.vendor_name {
7402            let val = buf.get_u8()?;
7403            *v = val;
7404        }
7405        for v in &mut __struct.model_name {
7406            let val = buf.get_u8()?;
7407            *v = val;
7408        }
7409        __struct.lens_id = buf.get_u8()?;
7410        let mut tmp = [0_u8; 140usize];
7411        for v in &mut tmp {
7412            *v = buf.get_u8()?;
7413        }
7414        __struct.cam_definition_uri = CharArray::new(tmp);
7415        __struct.gimbal_device_id = buf.get_u8()?;
7416        __struct.camera_device_id = buf.get_u8()?;
7417        Ok(__struct)
7418    }
7419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7420        let mut __tmp = BytesMut::new(bytes);
7421        #[allow(clippy::absurd_extreme_comparisons)]
7422        #[allow(unused_comparisons)]
7423        if __tmp.remaining() < Self::ENCODED_LEN {
7424            panic!(
7425                "buffer is too small (need {} bytes, but got {})",
7426                Self::ENCODED_LEN,
7427                __tmp.remaining(),
7428            )
7429        }
7430        __tmp.put_u32_le(self.time_boot_ms);
7431        __tmp.put_u32_le(self.firmware_version);
7432        __tmp.put_f32_le(self.focal_length);
7433        __tmp.put_f32_le(self.sensor_size_h);
7434        __tmp.put_f32_le(self.sensor_size_v);
7435        __tmp.put_u32_le(self.flags.bits() as u32);
7436        __tmp.put_u16_le(self.resolution_h);
7437        __tmp.put_u16_le(self.resolution_v);
7438        __tmp.put_u16_le(self.cam_definition_version);
7439        for val in &self.vendor_name {
7440            __tmp.put_u8(*val);
7441        }
7442        for val in &self.model_name {
7443            __tmp.put_u8(*val);
7444        }
7445        __tmp.put_u8(self.lens_id);
7446        for val in &self.cam_definition_uri {
7447            __tmp.put_u8(*val);
7448        }
7449        if matches!(version, MavlinkVersion::V2) {
7450            __tmp.put_u8(self.gimbal_device_id);
7451            __tmp.put_u8(self.camera_device_id);
7452            let len = __tmp.len();
7453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7454        } else {
7455            __tmp.len()
7456        }
7457    }
7458}
7459#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7460#[doc = ""]
7461#[doc = "ID: 260"]
7462#[derive(Debug, Clone, PartialEq)]
7463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7465#[cfg_attr(feature = "ts", derive(TS))]
7466#[cfg_attr(feature = "ts", ts(export))]
7467pub struct CAMERA_SETTINGS_DATA {
7468    #[doc = "Timestamp (time since system boot)."]
7469    pub time_boot_ms: u32,
7470    #[doc = "Camera mode"]
7471    pub mode_id: CameraMode,
7472    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7473    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7474    pub zoomLevel: f32,
7475    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7476    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7477    pub focusLevel: f32,
7478    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7479    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7480    pub camera_device_id: u8,
7481}
7482impl CAMERA_SETTINGS_DATA {
7483    pub const ENCODED_LEN: usize = 14usize;
7484    pub const DEFAULT: Self = Self {
7485        time_boot_ms: 0_u32,
7486        mode_id: CameraMode::DEFAULT,
7487        zoomLevel: 0.0_f32,
7488        focusLevel: 0.0_f32,
7489        camera_device_id: 0_u8,
7490    };
7491    #[cfg(feature = "arbitrary")]
7492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7493        use arbitrary::{Arbitrary, Unstructured};
7494        let mut buf = [0u8; 1024];
7495        rng.fill_bytes(&mut buf);
7496        let mut unstructured = Unstructured::new(&buf);
7497        Self::arbitrary(&mut unstructured).unwrap_or_default()
7498    }
7499}
7500impl Default for CAMERA_SETTINGS_DATA {
7501    fn default() -> Self {
7502        Self::DEFAULT.clone()
7503    }
7504}
7505impl MessageData for CAMERA_SETTINGS_DATA {
7506    type Message = MavMessage;
7507    const ID: u32 = 260u32;
7508    const NAME: &'static str = "CAMERA_SETTINGS";
7509    const EXTRA_CRC: u8 = 146u8;
7510    const ENCODED_LEN: usize = 14usize;
7511    fn deser(
7512        _version: MavlinkVersion,
7513        __input: &[u8],
7514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7515        let avail_len = __input.len();
7516        let mut payload_buf = [0; Self::ENCODED_LEN];
7517        let mut buf = if avail_len < Self::ENCODED_LEN {
7518            payload_buf[0..avail_len].copy_from_slice(__input);
7519            Bytes::new(&payload_buf)
7520        } else {
7521            Bytes::new(__input)
7522        };
7523        let mut __struct = Self::default();
7524        __struct.time_boot_ms = buf.get_u32_le()?;
7525        let tmp = buf.get_u8()?;
7526        __struct.mode_id =
7527            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7528                enum_type: "CameraMode",
7529                value: tmp as u64,
7530            })?;
7531        __struct.zoomLevel = buf.get_f32_le()?;
7532        __struct.focusLevel = buf.get_f32_le()?;
7533        __struct.camera_device_id = buf.get_u8()?;
7534        Ok(__struct)
7535    }
7536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7537        let mut __tmp = BytesMut::new(bytes);
7538        #[allow(clippy::absurd_extreme_comparisons)]
7539        #[allow(unused_comparisons)]
7540        if __tmp.remaining() < Self::ENCODED_LEN {
7541            panic!(
7542                "buffer is too small (need {} bytes, but got {})",
7543                Self::ENCODED_LEN,
7544                __tmp.remaining(),
7545            )
7546        }
7547        __tmp.put_u32_le(self.time_boot_ms);
7548        __tmp.put_u8(self.mode_id as u8);
7549        if matches!(version, MavlinkVersion::V2) {
7550            __tmp.put_f32_le(self.zoomLevel);
7551            __tmp.put_f32_le(self.focusLevel);
7552            __tmp.put_u8(self.camera_device_id);
7553            let len = __tmp.len();
7554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7555        } else {
7556            __tmp.len()
7557        }
7558    }
7559}
7560#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7561#[doc = ""]
7562#[doc = "ID: 277"]
7563#[derive(Debug, Clone, PartialEq)]
7564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7566#[cfg_attr(feature = "ts", derive(TS))]
7567#[cfg_attr(feature = "ts", ts(export))]
7568pub struct CAMERA_THERMAL_RANGE_DATA {
7569    #[doc = "Timestamp (time since system boot)."]
7570    pub time_boot_ms: u32,
7571    #[doc = "Temperature max."]
7572    pub max: f32,
7573    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7574    pub max_point_x: f32,
7575    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7576    pub max_point_y: f32,
7577    #[doc = "Temperature min."]
7578    pub min: f32,
7579    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7580    pub min_point_x: f32,
7581    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7582    pub min_point_y: f32,
7583    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7584    pub stream_id: u8,
7585    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7586    pub camera_device_id: u8,
7587}
7588impl CAMERA_THERMAL_RANGE_DATA {
7589    pub const ENCODED_LEN: usize = 30usize;
7590    pub const DEFAULT: Self = Self {
7591        time_boot_ms: 0_u32,
7592        max: 0.0_f32,
7593        max_point_x: 0.0_f32,
7594        max_point_y: 0.0_f32,
7595        min: 0.0_f32,
7596        min_point_x: 0.0_f32,
7597        min_point_y: 0.0_f32,
7598        stream_id: 0_u8,
7599        camera_device_id: 0_u8,
7600    };
7601    #[cfg(feature = "arbitrary")]
7602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7603        use arbitrary::{Arbitrary, Unstructured};
7604        let mut buf = [0u8; 1024];
7605        rng.fill_bytes(&mut buf);
7606        let mut unstructured = Unstructured::new(&buf);
7607        Self::arbitrary(&mut unstructured).unwrap_or_default()
7608    }
7609}
7610impl Default for CAMERA_THERMAL_RANGE_DATA {
7611    fn default() -> Self {
7612        Self::DEFAULT.clone()
7613    }
7614}
7615impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7616    type Message = MavMessage;
7617    const ID: u32 = 277u32;
7618    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7619    const EXTRA_CRC: u8 = 62u8;
7620    const ENCODED_LEN: usize = 30usize;
7621    fn deser(
7622        _version: MavlinkVersion,
7623        __input: &[u8],
7624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7625        let avail_len = __input.len();
7626        let mut payload_buf = [0; Self::ENCODED_LEN];
7627        let mut buf = if avail_len < Self::ENCODED_LEN {
7628            payload_buf[0..avail_len].copy_from_slice(__input);
7629            Bytes::new(&payload_buf)
7630        } else {
7631            Bytes::new(__input)
7632        };
7633        let mut __struct = Self::default();
7634        __struct.time_boot_ms = buf.get_u32_le()?;
7635        __struct.max = buf.get_f32_le()?;
7636        __struct.max_point_x = buf.get_f32_le()?;
7637        __struct.max_point_y = buf.get_f32_le()?;
7638        __struct.min = buf.get_f32_le()?;
7639        __struct.min_point_x = buf.get_f32_le()?;
7640        __struct.min_point_y = buf.get_f32_le()?;
7641        __struct.stream_id = buf.get_u8()?;
7642        __struct.camera_device_id = buf.get_u8()?;
7643        Ok(__struct)
7644    }
7645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7646        let mut __tmp = BytesMut::new(bytes);
7647        #[allow(clippy::absurd_extreme_comparisons)]
7648        #[allow(unused_comparisons)]
7649        if __tmp.remaining() < Self::ENCODED_LEN {
7650            panic!(
7651                "buffer is too small (need {} bytes, but got {})",
7652                Self::ENCODED_LEN,
7653                __tmp.remaining(),
7654            )
7655        }
7656        __tmp.put_u32_le(self.time_boot_ms);
7657        __tmp.put_f32_le(self.max);
7658        __tmp.put_f32_le(self.max_point_x);
7659        __tmp.put_f32_le(self.max_point_y);
7660        __tmp.put_f32_le(self.min);
7661        __tmp.put_f32_le(self.min_point_x);
7662        __tmp.put_f32_le(self.min_point_y);
7663        __tmp.put_u8(self.stream_id);
7664        __tmp.put_u8(self.camera_device_id);
7665        if matches!(version, MavlinkVersion::V2) {
7666            let len = __tmp.len();
7667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7668        } else {
7669            __tmp.len()
7670        }
7671    }
7672}
7673#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7674#[doc = ""]
7675#[doc = "ID: 276"]
7676#[derive(Debug, Clone, PartialEq)]
7677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7679#[cfg_attr(feature = "ts", derive(TS))]
7680#[cfg_attr(feature = "ts", ts(export))]
7681pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7682    #[doc = "Latitude of tracked object"]
7683    pub lat: i32,
7684    #[doc = "Longitude of tracked object"]
7685    pub lon: i32,
7686    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7687    pub alt: f32,
7688    #[doc = "Horizontal accuracy. NAN if unknown"]
7689    pub h_acc: f32,
7690    #[doc = "Vertical accuracy. NAN if unknown"]
7691    pub v_acc: f32,
7692    #[doc = "North velocity of tracked object. NAN if unknown"]
7693    pub vel_n: f32,
7694    #[doc = "East velocity of tracked object. NAN if unknown"]
7695    pub vel_e: f32,
7696    #[doc = "Down velocity of tracked object. NAN if unknown"]
7697    pub vel_d: f32,
7698    #[doc = "Velocity accuracy. NAN if unknown"]
7699    pub vel_acc: f32,
7700    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7701    pub dist: f32,
7702    #[doc = "Heading in radians, in NED. NAN if unknown"]
7703    pub hdg: f32,
7704    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7705    pub hdg_acc: f32,
7706    #[doc = "Current tracking status"]
7707    pub tracking_status: CameraTrackingStatusFlags,
7708    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7710    pub camera_device_id: u8,
7711}
7712impl CAMERA_TRACKING_GEO_STATUS_DATA {
7713    pub const ENCODED_LEN: usize = 50usize;
7714    pub const DEFAULT: Self = Self {
7715        lat: 0_i32,
7716        lon: 0_i32,
7717        alt: 0.0_f32,
7718        h_acc: 0.0_f32,
7719        v_acc: 0.0_f32,
7720        vel_n: 0.0_f32,
7721        vel_e: 0.0_f32,
7722        vel_d: 0.0_f32,
7723        vel_acc: 0.0_f32,
7724        dist: 0.0_f32,
7725        hdg: 0.0_f32,
7726        hdg_acc: 0.0_f32,
7727        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7728        camera_device_id: 0_u8,
7729    };
7730    #[cfg(feature = "arbitrary")]
7731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7732        use arbitrary::{Arbitrary, Unstructured};
7733        let mut buf = [0u8; 1024];
7734        rng.fill_bytes(&mut buf);
7735        let mut unstructured = Unstructured::new(&buf);
7736        Self::arbitrary(&mut unstructured).unwrap_or_default()
7737    }
7738}
7739impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7740    fn default() -> Self {
7741        Self::DEFAULT.clone()
7742    }
7743}
7744impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7745    type Message = MavMessage;
7746    const ID: u32 = 276u32;
7747    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7748    const EXTRA_CRC: u8 = 18u8;
7749    const ENCODED_LEN: usize = 50usize;
7750    fn deser(
7751        _version: MavlinkVersion,
7752        __input: &[u8],
7753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7754        let avail_len = __input.len();
7755        let mut payload_buf = [0; Self::ENCODED_LEN];
7756        let mut buf = if avail_len < Self::ENCODED_LEN {
7757            payload_buf[0..avail_len].copy_from_slice(__input);
7758            Bytes::new(&payload_buf)
7759        } else {
7760            Bytes::new(__input)
7761        };
7762        let mut __struct = Self::default();
7763        __struct.lat = buf.get_i32_le()?;
7764        __struct.lon = buf.get_i32_le()?;
7765        __struct.alt = buf.get_f32_le()?;
7766        __struct.h_acc = buf.get_f32_le()?;
7767        __struct.v_acc = buf.get_f32_le()?;
7768        __struct.vel_n = buf.get_f32_le()?;
7769        __struct.vel_e = buf.get_f32_le()?;
7770        __struct.vel_d = buf.get_f32_le()?;
7771        __struct.vel_acc = buf.get_f32_le()?;
7772        __struct.dist = buf.get_f32_le()?;
7773        __struct.hdg = buf.get_f32_le()?;
7774        __struct.hdg_acc = buf.get_f32_le()?;
7775        let tmp = buf.get_u8()?;
7776        __struct.tracking_status =
7777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7778                enum_type: "CameraTrackingStatusFlags",
7779                value: tmp as u64,
7780            })?;
7781        __struct.camera_device_id = buf.get_u8()?;
7782        Ok(__struct)
7783    }
7784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7785        let mut __tmp = BytesMut::new(bytes);
7786        #[allow(clippy::absurd_extreme_comparisons)]
7787        #[allow(unused_comparisons)]
7788        if __tmp.remaining() < Self::ENCODED_LEN {
7789            panic!(
7790                "buffer is too small (need {} bytes, but got {})",
7791                Self::ENCODED_LEN,
7792                __tmp.remaining(),
7793            )
7794        }
7795        __tmp.put_i32_le(self.lat);
7796        __tmp.put_i32_le(self.lon);
7797        __tmp.put_f32_le(self.alt);
7798        __tmp.put_f32_le(self.h_acc);
7799        __tmp.put_f32_le(self.v_acc);
7800        __tmp.put_f32_le(self.vel_n);
7801        __tmp.put_f32_le(self.vel_e);
7802        __tmp.put_f32_le(self.vel_d);
7803        __tmp.put_f32_le(self.vel_acc);
7804        __tmp.put_f32_le(self.dist);
7805        __tmp.put_f32_le(self.hdg);
7806        __tmp.put_f32_le(self.hdg_acc);
7807        __tmp.put_u8(self.tracking_status as u8);
7808        if matches!(version, MavlinkVersion::V2) {
7809            __tmp.put_u8(self.camera_device_id);
7810            let len = __tmp.len();
7811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7812        } else {
7813            __tmp.len()
7814        }
7815    }
7816}
7817#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7818#[doc = ""]
7819#[doc = "ID: 275"]
7820#[derive(Debug, Clone, PartialEq)]
7821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7823#[cfg_attr(feature = "ts", derive(TS))]
7824#[cfg_attr(feature = "ts", ts(export))]
7825pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7826    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7827    pub point_x: f32,
7828    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7829    pub point_y: f32,
7830    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7831    pub radius: f32,
7832    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7833    pub rec_top_x: f32,
7834    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7835    pub rec_top_y: f32,
7836    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7837    pub rec_bottom_x: f32,
7838    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7839    pub rec_bottom_y: f32,
7840    #[doc = "Current tracking status"]
7841    pub tracking_status: CameraTrackingStatusFlags,
7842    #[doc = "Current tracking mode"]
7843    pub tracking_mode: CameraTrackingMode,
7844    #[doc = "Defines location of target data"]
7845    pub target_data: CameraTrackingTargetData,
7846    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7848    pub camera_device_id: u8,
7849}
7850impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7851    pub const ENCODED_LEN: usize = 32usize;
7852    pub const DEFAULT: Self = Self {
7853        point_x: 0.0_f32,
7854        point_y: 0.0_f32,
7855        radius: 0.0_f32,
7856        rec_top_x: 0.0_f32,
7857        rec_top_y: 0.0_f32,
7858        rec_bottom_x: 0.0_f32,
7859        rec_bottom_y: 0.0_f32,
7860        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7861        tracking_mode: CameraTrackingMode::DEFAULT,
7862        target_data: CameraTrackingTargetData::DEFAULT,
7863        camera_device_id: 0_u8,
7864    };
7865    #[cfg(feature = "arbitrary")]
7866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7867        use arbitrary::{Arbitrary, Unstructured};
7868        let mut buf = [0u8; 1024];
7869        rng.fill_bytes(&mut buf);
7870        let mut unstructured = Unstructured::new(&buf);
7871        Self::arbitrary(&mut unstructured).unwrap_or_default()
7872    }
7873}
7874impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7875    fn default() -> Self {
7876        Self::DEFAULT.clone()
7877    }
7878}
7879impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7880    type Message = MavMessage;
7881    const ID: u32 = 275u32;
7882    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7883    const EXTRA_CRC: u8 = 126u8;
7884    const ENCODED_LEN: usize = 32usize;
7885    fn deser(
7886        _version: MavlinkVersion,
7887        __input: &[u8],
7888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7889        let avail_len = __input.len();
7890        let mut payload_buf = [0; Self::ENCODED_LEN];
7891        let mut buf = if avail_len < Self::ENCODED_LEN {
7892            payload_buf[0..avail_len].copy_from_slice(__input);
7893            Bytes::new(&payload_buf)
7894        } else {
7895            Bytes::new(__input)
7896        };
7897        let mut __struct = Self::default();
7898        __struct.point_x = buf.get_f32_le()?;
7899        __struct.point_y = buf.get_f32_le()?;
7900        __struct.radius = buf.get_f32_le()?;
7901        __struct.rec_top_x = buf.get_f32_le()?;
7902        __struct.rec_top_y = buf.get_f32_le()?;
7903        __struct.rec_bottom_x = buf.get_f32_le()?;
7904        __struct.rec_bottom_y = buf.get_f32_le()?;
7905        let tmp = buf.get_u8()?;
7906        __struct.tracking_status =
7907            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7908                enum_type: "CameraTrackingStatusFlags",
7909                value: tmp as u64,
7910            })?;
7911        let tmp = buf.get_u8()?;
7912        __struct.tracking_mode =
7913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7914                enum_type: "CameraTrackingMode",
7915                value: tmp as u64,
7916            })?;
7917        let tmp = buf.get_u8()?;
7918        __struct.target_data =
7919            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
7920                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7921                flag_type: "CameraTrackingTargetData",
7922                value: tmp as u64,
7923            })?;
7924        __struct.camera_device_id = buf.get_u8()?;
7925        Ok(__struct)
7926    }
7927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7928        let mut __tmp = BytesMut::new(bytes);
7929        #[allow(clippy::absurd_extreme_comparisons)]
7930        #[allow(unused_comparisons)]
7931        if __tmp.remaining() < Self::ENCODED_LEN {
7932            panic!(
7933                "buffer is too small (need {} bytes, but got {})",
7934                Self::ENCODED_LEN,
7935                __tmp.remaining(),
7936            )
7937        }
7938        __tmp.put_f32_le(self.point_x);
7939        __tmp.put_f32_le(self.point_y);
7940        __tmp.put_f32_le(self.radius);
7941        __tmp.put_f32_le(self.rec_top_x);
7942        __tmp.put_f32_le(self.rec_top_y);
7943        __tmp.put_f32_le(self.rec_bottom_x);
7944        __tmp.put_f32_le(self.rec_bottom_y);
7945        __tmp.put_u8(self.tracking_status as u8);
7946        __tmp.put_u8(self.tracking_mode as u8);
7947        __tmp.put_u8(self.target_data.bits() as u8);
7948        if matches!(version, MavlinkVersion::V2) {
7949            __tmp.put_u8(self.camera_device_id);
7950            let len = __tmp.len();
7951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7952        } else {
7953            __tmp.len()
7954        }
7955    }
7956}
7957#[doc = "Camera-IMU triggering and synchronisation message."]
7958#[doc = ""]
7959#[doc = "ID: 112"]
7960#[derive(Debug, Clone, PartialEq)]
7961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7963#[cfg_attr(feature = "ts", derive(TS))]
7964#[cfg_attr(feature = "ts", ts(export))]
7965pub struct CAMERA_TRIGGER_DATA {
7966    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7967    pub time_usec: u64,
7968    #[doc = "Image frame sequence"]
7969    pub seq: u32,
7970}
7971impl CAMERA_TRIGGER_DATA {
7972    pub const ENCODED_LEN: usize = 12usize;
7973    pub const DEFAULT: Self = Self {
7974        time_usec: 0_u64,
7975        seq: 0_u32,
7976    };
7977    #[cfg(feature = "arbitrary")]
7978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7979        use arbitrary::{Arbitrary, Unstructured};
7980        let mut buf = [0u8; 1024];
7981        rng.fill_bytes(&mut buf);
7982        let mut unstructured = Unstructured::new(&buf);
7983        Self::arbitrary(&mut unstructured).unwrap_or_default()
7984    }
7985}
7986impl Default for CAMERA_TRIGGER_DATA {
7987    fn default() -> Self {
7988        Self::DEFAULT.clone()
7989    }
7990}
7991impl MessageData for CAMERA_TRIGGER_DATA {
7992    type Message = MavMessage;
7993    const ID: u32 = 112u32;
7994    const NAME: &'static str = "CAMERA_TRIGGER";
7995    const EXTRA_CRC: u8 = 174u8;
7996    const ENCODED_LEN: usize = 12usize;
7997    fn deser(
7998        _version: MavlinkVersion,
7999        __input: &[u8],
8000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8001        let avail_len = __input.len();
8002        let mut payload_buf = [0; Self::ENCODED_LEN];
8003        let mut buf = if avail_len < Self::ENCODED_LEN {
8004            payload_buf[0..avail_len].copy_from_slice(__input);
8005            Bytes::new(&payload_buf)
8006        } else {
8007            Bytes::new(__input)
8008        };
8009        let mut __struct = Self::default();
8010        __struct.time_usec = buf.get_u64_le()?;
8011        __struct.seq = buf.get_u32_le()?;
8012        Ok(__struct)
8013    }
8014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8015        let mut __tmp = BytesMut::new(bytes);
8016        #[allow(clippy::absurd_extreme_comparisons)]
8017        #[allow(unused_comparisons)]
8018        if __tmp.remaining() < Self::ENCODED_LEN {
8019            panic!(
8020                "buffer is too small (need {} bytes, but got {})",
8021                Self::ENCODED_LEN,
8022                __tmp.remaining(),
8023            )
8024        }
8025        __tmp.put_u64_le(self.time_usec);
8026        __tmp.put_u32_le(self.seq);
8027        if matches!(version, MavlinkVersion::V2) {
8028            let len = __tmp.len();
8029            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8030        } else {
8031            __tmp.len()
8032        }
8033    }
8034}
8035#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8036#[doc = ""]
8037#[doc = "ID: 387"]
8038#[derive(Debug, Clone, PartialEq)]
8039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8041#[cfg_attr(feature = "ts", derive(TS))]
8042#[cfg_attr(feature = "ts", ts(export))]
8043pub struct CANFD_FRAME_DATA {
8044    #[doc = "Frame ID"]
8045    pub id: u32,
8046    #[doc = "System ID."]
8047    pub target_system: u8,
8048    #[doc = "Component ID."]
8049    pub target_component: u8,
8050    #[doc = "bus number"]
8051    pub bus: u8,
8052    #[doc = "Frame length"]
8053    pub len: u8,
8054    #[doc = "Frame data"]
8055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8056    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8057    pub data: [u8; 64],
8058}
8059impl CANFD_FRAME_DATA {
8060    pub const ENCODED_LEN: usize = 72usize;
8061    pub const DEFAULT: Self = Self {
8062        id: 0_u32,
8063        target_system: 0_u8,
8064        target_component: 0_u8,
8065        bus: 0_u8,
8066        len: 0_u8,
8067        data: [0_u8; 64usize],
8068    };
8069    #[cfg(feature = "arbitrary")]
8070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8071        use arbitrary::{Arbitrary, Unstructured};
8072        let mut buf = [0u8; 1024];
8073        rng.fill_bytes(&mut buf);
8074        let mut unstructured = Unstructured::new(&buf);
8075        Self::arbitrary(&mut unstructured).unwrap_or_default()
8076    }
8077}
8078impl Default for CANFD_FRAME_DATA {
8079    fn default() -> Self {
8080        Self::DEFAULT.clone()
8081    }
8082}
8083impl MessageData for CANFD_FRAME_DATA {
8084    type Message = MavMessage;
8085    const ID: u32 = 387u32;
8086    const NAME: &'static str = "CANFD_FRAME";
8087    const EXTRA_CRC: u8 = 4u8;
8088    const ENCODED_LEN: usize = 72usize;
8089    fn deser(
8090        _version: MavlinkVersion,
8091        __input: &[u8],
8092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8093        let avail_len = __input.len();
8094        let mut payload_buf = [0; Self::ENCODED_LEN];
8095        let mut buf = if avail_len < Self::ENCODED_LEN {
8096            payload_buf[0..avail_len].copy_from_slice(__input);
8097            Bytes::new(&payload_buf)
8098        } else {
8099            Bytes::new(__input)
8100        };
8101        let mut __struct = Self::default();
8102        __struct.id = buf.get_u32_le()?;
8103        __struct.target_system = buf.get_u8()?;
8104        __struct.target_component = buf.get_u8()?;
8105        __struct.bus = buf.get_u8()?;
8106        __struct.len = buf.get_u8()?;
8107        for v in &mut __struct.data {
8108            let val = buf.get_u8()?;
8109            *v = val;
8110        }
8111        Ok(__struct)
8112    }
8113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8114        let mut __tmp = BytesMut::new(bytes);
8115        #[allow(clippy::absurd_extreme_comparisons)]
8116        #[allow(unused_comparisons)]
8117        if __tmp.remaining() < Self::ENCODED_LEN {
8118            panic!(
8119                "buffer is too small (need {} bytes, but got {})",
8120                Self::ENCODED_LEN,
8121                __tmp.remaining(),
8122            )
8123        }
8124        __tmp.put_u32_le(self.id);
8125        __tmp.put_u8(self.target_system);
8126        __tmp.put_u8(self.target_component);
8127        __tmp.put_u8(self.bus);
8128        __tmp.put_u8(self.len);
8129        for val in &self.data {
8130            __tmp.put_u8(*val);
8131        }
8132        if matches!(version, MavlinkVersion::V2) {
8133            let len = __tmp.len();
8134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8135        } else {
8136            __tmp.len()
8137        }
8138    }
8139}
8140#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8141#[doc = ""]
8142#[doc = "ID: 388"]
8143#[derive(Debug, Clone, PartialEq)]
8144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8146#[cfg_attr(feature = "ts", derive(TS))]
8147#[cfg_attr(feature = "ts", ts(export))]
8148pub struct CAN_FILTER_MODIFY_DATA {
8149    #[doc = "filter IDs, length num_ids"]
8150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8151    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8152    pub ids: [u16; 16],
8153    #[doc = "System ID."]
8154    pub target_system: u8,
8155    #[doc = "Component ID."]
8156    pub target_component: u8,
8157    #[doc = "bus number"]
8158    pub bus: u8,
8159    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8160    pub operation: CanFilterOp,
8161    #[doc = "number of IDs in filter list"]
8162    pub num_ids: u8,
8163}
8164impl CAN_FILTER_MODIFY_DATA {
8165    pub const ENCODED_LEN: usize = 37usize;
8166    pub const DEFAULT: Self = Self {
8167        ids: [0_u16; 16usize],
8168        target_system: 0_u8,
8169        target_component: 0_u8,
8170        bus: 0_u8,
8171        operation: CanFilterOp::DEFAULT,
8172        num_ids: 0_u8,
8173    };
8174    #[cfg(feature = "arbitrary")]
8175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8176        use arbitrary::{Arbitrary, Unstructured};
8177        let mut buf = [0u8; 1024];
8178        rng.fill_bytes(&mut buf);
8179        let mut unstructured = Unstructured::new(&buf);
8180        Self::arbitrary(&mut unstructured).unwrap_or_default()
8181    }
8182}
8183impl Default for CAN_FILTER_MODIFY_DATA {
8184    fn default() -> Self {
8185        Self::DEFAULT.clone()
8186    }
8187}
8188impl MessageData for CAN_FILTER_MODIFY_DATA {
8189    type Message = MavMessage;
8190    const ID: u32 = 388u32;
8191    const NAME: &'static str = "CAN_FILTER_MODIFY";
8192    const EXTRA_CRC: u8 = 8u8;
8193    const ENCODED_LEN: usize = 37usize;
8194    fn deser(
8195        _version: MavlinkVersion,
8196        __input: &[u8],
8197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8198        let avail_len = __input.len();
8199        let mut payload_buf = [0; Self::ENCODED_LEN];
8200        let mut buf = if avail_len < Self::ENCODED_LEN {
8201            payload_buf[0..avail_len].copy_from_slice(__input);
8202            Bytes::new(&payload_buf)
8203        } else {
8204            Bytes::new(__input)
8205        };
8206        let mut __struct = Self::default();
8207        for v in &mut __struct.ids {
8208            let val = buf.get_u16_le()?;
8209            *v = val;
8210        }
8211        __struct.target_system = buf.get_u8()?;
8212        __struct.target_component = buf.get_u8()?;
8213        __struct.bus = buf.get_u8()?;
8214        let tmp = buf.get_u8()?;
8215        __struct.operation =
8216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8217                enum_type: "CanFilterOp",
8218                value: tmp as u64,
8219            })?;
8220        __struct.num_ids = buf.get_u8()?;
8221        Ok(__struct)
8222    }
8223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8224        let mut __tmp = BytesMut::new(bytes);
8225        #[allow(clippy::absurd_extreme_comparisons)]
8226        #[allow(unused_comparisons)]
8227        if __tmp.remaining() < Self::ENCODED_LEN {
8228            panic!(
8229                "buffer is too small (need {} bytes, but got {})",
8230                Self::ENCODED_LEN,
8231                __tmp.remaining(),
8232            )
8233        }
8234        for val in &self.ids {
8235            __tmp.put_u16_le(*val);
8236        }
8237        __tmp.put_u8(self.target_system);
8238        __tmp.put_u8(self.target_component);
8239        __tmp.put_u8(self.bus);
8240        __tmp.put_u8(self.operation as u8);
8241        __tmp.put_u8(self.num_ids);
8242        if matches!(version, MavlinkVersion::V2) {
8243            let len = __tmp.len();
8244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8245        } else {
8246            __tmp.len()
8247        }
8248    }
8249}
8250#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8251#[doc = ""]
8252#[doc = "ID: 386"]
8253#[derive(Debug, Clone, PartialEq)]
8254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8256#[cfg_attr(feature = "ts", derive(TS))]
8257#[cfg_attr(feature = "ts", ts(export))]
8258pub struct CAN_FRAME_DATA {
8259    #[doc = "Frame ID"]
8260    pub id: u32,
8261    #[doc = "System ID."]
8262    pub target_system: u8,
8263    #[doc = "Component ID."]
8264    pub target_component: u8,
8265    #[doc = "Bus number"]
8266    pub bus: u8,
8267    #[doc = "Frame length"]
8268    pub len: u8,
8269    #[doc = "Frame data"]
8270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8271    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8272    pub data: [u8; 8],
8273}
8274impl CAN_FRAME_DATA {
8275    pub const ENCODED_LEN: usize = 16usize;
8276    pub const DEFAULT: Self = Self {
8277        id: 0_u32,
8278        target_system: 0_u8,
8279        target_component: 0_u8,
8280        bus: 0_u8,
8281        len: 0_u8,
8282        data: [0_u8; 8usize],
8283    };
8284    #[cfg(feature = "arbitrary")]
8285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8286        use arbitrary::{Arbitrary, Unstructured};
8287        let mut buf = [0u8; 1024];
8288        rng.fill_bytes(&mut buf);
8289        let mut unstructured = Unstructured::new(&buf);
8290        Self::arbitrary(&mut unstructured).unwrap_or_default()
8291    }
8292}
8293impl Default for CAN_FRAME_DATA {
8294    fn default() -> Self {
8295        Self::DEFAULT.clone()
8296    }
8297}
8298impl MessageData for CAN_FRAME_DATA {
8299    type Message = MavMessage;
8300    const ID: u32 = 386u32;
8301    const NAME: &'static str = "CAN_FRAME";
8302    const EXTRA_CRC: u8 = 132u8;
8303    const ENCODED_LEN: usize = 16usize;
8304    fn deser(
8305        _version: MavlinkVersion,
8306        __input: &[u8],
8307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8308        let avail_len = __input.len();
8309        let mut payload_buf = [0; Self::ENCODED_LEN];
8310        let mut buf = if avail_len < Self::ENCODED_LEN {
8311            payload_buf[0..avail_len].copy_from_slice(__input);
8312            Bytes::new(&payload_buf)
8313        } else {
8314            Bytes::new(__input)
8315        };
8316        let mut __struct = Self::default();
8317        __struct.id = buf.get_u32_le()?;
8318        __struct.target_system = buf.get_u8()?;
8319        __struct.target_component = buf.get_u8()?;
8320        __struct.bus = buf.get_u8()?;
8321        __struct.len = buf.get_u8()?;
8322        for v in &mut __struct.data {
8323            let val = buf.get_u8()?;
8324            *v = val;
8325        }
8326        Ok(__struct)
8327    }
8328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8329        let mut __tmp = BytesMut::new(bytes);
8330        #[allow(clippy::absurd_extreme_comparisons)]
8331        #[allow(unused_comparisons)]
8332        if __tmp.remaining() < Self::ENCODED_LEN {
8333            panic!(
8334                "buffer is too small (need {} bytes, but got {})",
8335                Self::ENCODED_LEN,
8336                __tmp.remaining(),
8337            )
8338        }
8339        __tmp.put_u32_le(self.id);
8340        __tmp.put_u8(self.target_system);
8341        __tmp.put_u8(self.target_component);
8342        __tmp.put_u8(self.bus);
8343        __tmp.put_u8(self.len);
8344        for val in &self.data {
8345            __tmp.put_u8(*val);
8346        }
8347        if matches!(version, MavlinkVersion::V2) {
8348            let len = __tmp.len();
8349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8350        } else {
8351            __tmp.len()
8352        }
8353    }
8354}
8355#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8356#[doc = ""]
8357#[doc = "ID: 336"]
8358#[derive(Debug, Clone, PartialEq)]
8359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8361#[cfg_attr(feature = "ts", derive(TS))]
8362#[cfg_attr(feature = "ts", ts(export))]
8363pub struct CELLULAR_CONFIG_DATA {
8364    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8365    pub enable_lte: u8,
8366    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8367    pub enable_pin: u8,
8368    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8369    #[cfg_attr(feature = "ts", ts(type = "string"))]
8370    pub pin: CharArray<16>,
8371    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8372    #[cfg_attr(feature = "ts", ts(type = "string"))]
8373    pub new_pin: CharArray<16>,
8374    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8375    #[cfg_attr(feature = "ts", ts(type = "string"))]
8376    pub apn: CharArray<32>,
8377    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8378    #[cfg_attr(feature = "ts", ts(type = "string"))]
8379    pub puk: CharArray<16>,
8380    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8381    pub roaming: u8,
8382    #[doc = "Message acceptance response (sent back to GS)."]
8383    pub response: CellularConfigResponse,
8384}
8385impl CELLULAR_CONFIG_DATA {
8386    pub const ENCODED_LEN: usize = 84usize;
8387    pub const DEFAULT: Self = Self {
8388        enable_lte: 0_u8,
8389        enable_pin: 0_u8,
8390        pin: CharArray::new([0_u8; 16usize]),
8391        new_pin: CharArray::new([0_u8; 16usize]),
8392        apn: CharArray::new([0_u8; 32usize]),
8393        puk: CharArray::new([0_u8; 16usize]),
8394        roaming: 0_u8,
8395        response: CellularConfigResponse::DEFAULT,
8396    };
8397    #[cfg(feature = "arbitrary")]
8398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8399        use arbitrary::{Arbitrary, Unstructured};
8400        let mut buf = [0u8; 1024];
8401        rng.fill_bytes(&mut buf);
8402        let mut unstructured = Unstructured::new(&buf);
8403        Self::arbitrary(&mut unstructured).unwrap_or_default()
8404    }
8405}
8406impl Default for CELLULAR_CONFIG_DATA {
8407    fn default() -> Self {
8408        Self::DEFAULT.clone()
8409    }
8410}
8411impl MessageData for CELLULAR_CONFIG_DATA {
8412    type Message = MavMessage;
8413    const ID: u32 = 336u32;
8414    const NAME: &'static str = "CELLULAR_CONFIG";
8415    const EXTRA_CRC: u8 = 245u8;
8416    const ENCODED_LEN: usize = 84usize;
8417    fn deser(
8418        _version: MavlinkVersion,
8419        __input: &[u8],
8420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8421        let avail_len = __input.len();
8422        let mut payload_buf = [0; Self::ENCODED_LEN];
8423        let mut buf = if avail_len < Self::ENCODED_LEN {
8424            payload_buf[0..avail_len].copy_from_slice(__input);
8425            Bytes::new(&payload_buf)
8426        } else {
8427            Bytes::new(__input)
8428        };
8429        let mut __struct = Self::default();
8430        __struct.enable_lte = buf.get_u8()?;
8431        __struct.enable_pin = buf.get_u8()?;
8432        let mut tmp = [0_u8; 16usize];
8433        for v in &mut tmp {
8434            *v = buf.get_u8()?;
8435        }
8436        __struct.pin = CharArray::new(tmp);
8437        let mut tmp = [0_u8; 16usize];
8438        for v in &mut tmp {
8439            *v = buf.get_u8()?;
8440        }
8441        __struct.new_pin = CharArray::new(tmp);
8442        let mut tmp = [0_u8; 32usize];
8443        for v in &mut tmp {
8444            *v = buf.get_u8()?;
8445        }
8446        __struct.apn = CharArray::new(tmp);
8447        let mut tmp = [0_u8; 16usize];
8448        for v in &mut tmp {
8449            *v = buf.get_u8()?;
8450        }
8451        __struct.puk = CharArray::new(tmp);
8452        __struct.roaming = buf.get_u8()?;
8453        let tmp = buf.get_u8()?;
8454        __struct.response =
8455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8456                enum_type: "CellularConfigResponse",
8457                value: tmp as u64,
8458            })?;
8459        Ok(__struct)
8460    }
8461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8462        let mut __tmp = BytesMut::new(bytes);
8463        #[allow(clippy::absurd_extreme_comparisons)]
8464        #[allow(unused_comparisons)]
8465        if __tmp.remaining() < Self::ENCODED_LEN {
8466            panic!(
8467                "buffer is too small (need {} bytes, but got {})",
8468                Self::ENCODED_LEN,
8469                __tmp.remaining(),
8470            )
8471        }
8472        __tmp.put_u8(self.enable_lte);
8473        __tmp.put_u8(self.enable_pin);
8474        for val in &self.pin {
8475            __tmp.put_u8(*val);
8476        }
8477        for val in &self.new_pin {
8478            __tmp.put_u8(*val);
8479        }
8480        for val in &self.apn {
8481            __tmp.put_u8(*val);
8482        }
8483        for val in &self.puk {
8484            __tmp.put_u8(*val);
8485        }
8486        __tmp.put_u8(self.roaming);
8487        __tmp.put_u8(self.response as u8);
8488        if matches!(version, MavlinkVersion::V2) {
8489            let len = __tmp.len();
8490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8491        } else {
8492            __tmp.len()
8493        }
8494    }
8495}
8496#[doc = "Report current used cellular network status."]
8497#[doc = ""]
8498#[doc = "ID: 334"]
8499#[derive(Debug, Clone, PartialEq)]
8500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8502#[cfg_attr(feature = "ts", derive(TS))]
8503#[cfg_attr(feature = "ts", ts(export))]
8504pub struct CELLULAR_STATUS_DATA {
8505    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8506    pub mcc: u16,
8507    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8508    pub mnc: u16,
8509    #[doc = "Location area code. If unknown, set to 0"]
8510    pub lac: u16,
8511    #[doc = "Cellular modem status"]
8512    pub status: CellularStatusFlag,
8513    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8514    pub failure_reason: CellularNetworkFailedReason,
8515    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8516    pub mavtype: CellularNetworkRadioType,
8517    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8518    pub quality: u8,
8519}
8520impl CELLULAR_STATUS_DATA {
8521    pub const ENCODED_LEN: usize = 10usize;
8522    pub const DEFAULT: Self = Self {
8523        mcc: 0_u16,
8524        mnc: 0_u16,
8525        lac: 0_u16,
8526        status: CellularStatusFlag::DEFAULT,
8527        failure_reason: CellularNetworkFailedReason::DEFAULT,
8528        mavtype: CellularNetworkRadioType::DEFAULT,
8529        quality: 0_u8,
8530    };
8531    #[cfg(feature = "arbitrary")]
8532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8533        use arbitrary::{Arbitrary, Unstructured};
8534        let mut buf = [0u8; 1024];
8535        rng.fill_bytes(&mut buf);
8536        let mut unstructured = Unstructured::new(&buf);
8537        Self::arbitrary(&mut unstructured).unwrap_or_default()
8538    }
8539}
8540impl Default for CELLULAR_STATUS_DATA {
8541    fn default() -> Self {
8542        Self::DEFAULT.clone()
8543    }
8544}
8545impl MessageData for CELLULAR_STATUS_DATA {
8546    type Message = MavMessage;
8547    const ID: u32 = 334u32;
8548    const NAME: &'static str = "CELLULAR_STATUS";
8549    const EXTRA_CRC: u8 = 72u8;
8550    const ENCODED_LEN: usize = 10usize;
8551    fn deser(
8552        _version: MavlinkVersion,
8553        __input: &[u8],
8554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8555        let avail_len = __input.len();
8556        let mut payload_buf = [0; Self::ENCODED_LEN];
8557        let mut buf = if avail_len < Self::ENCODED_LEN {
8558            payload_buf[0..avail_len].copy_from_slice(__input);
8559            Bytes::new(&payload_buf)
8560        } else {
8561            Bytes::new(__input)
8562        };
8563        let mut __struct = Self::default();
8564        __struct.mcc = buf.get_u16_le()?;
8565        __struct.mnc = buf.get_u16_le()?;
8566        __struct.lac = buf.get_u16_le()?;
8567        let tmp = buf.get_u8()?;
8568        __struct.status =
8569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8570                enum_type: "CellularStatusFlag",
8571                value: tmp as u64,
8572            })?;
8573        let tmp = buf.get_u8()?;
8574        __struct.failure_reason =
8575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8576                enum_type: "CellularNetworkFailedReason",
8577                value: tmp as u64,
8578            })?;
8579        let tmp = buf.get_u8()?;
8580        __struct.mavtype =
8581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8582                enum_type: "CellularNetworkRadioType",
8583                value: tmp as u64,
8584            })?;
8585        __struct.quality = buf.get_u8()?;
8586        Ok(__struct)
8587    }
8588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8589        let mut __tmp = BytesMut::new(bytes);
8590        #[allow(clippy::absurd_extreme_comparisons)]
8591        #[allow(unused_comparisons)]
8592        if __tmp.remaining() < Self::ENCODED_LEN {
8593            panic!(
8594                "buffer is too small (need {} bytes, but got {})",
8595                Self::ENCODED_LEN,
8596                __tmp.remaining(),
8597            )
8598        }
8599        __tmp.put_u16_le(self.mcc);
8600        __tmp.put_u16_le(self.mnc);
8601        __tmp.put_u16_le(self.lac);
8602        __tmp.put_u8(self.status as u8);
8603        __tmp.put_u8(self.failure_reason as u8);
8604        __tmp.put_u8(self.mavtype as u8);
8605        __tmp.put_u8(self.quality);
8606        if matches!(version, MavlinkVersion::V2) {
8607            let len = __tmp.len();
8608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8609        } else {
8610            __tmp.len()
8611        }
8612    }
8613}
8614#[doc = "Request to control this MAV."]
8615#[doc = ""]
8616#[doc = "ID: 5"]
8617#[derive(Debug, Clone, PartialEq)]
8618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8620#[cfg_attr(feature = "ts", derive(TS))]
8621#[cfg_attr(feature = "ts", ts(export))]
8622pub struct CHANGE_OPERATOR_CONTROL_DATA {
8623    #[doc = "System the GCS requests control for"]
8624    pub target_system: u8,
8625    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8626    pub control_request: u8,
8627    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8628    pub version: u8,
8629    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8630    #[cfg_attr(feature = "ts", ts(type = "string"))]
8631    pub passkey: CharArray<25>,
8632}
8633impl CHANGE_OPERATOR_CONTROL_DATA {
8634    pub const ENCODED_LEN: usize = 28usize;
8635    pub const DEFAULT: Self = Self {
8636        target_system: 0_u8,
8637        control_request: 0_u8,
8638        version: 0_u8,
8639        passkey: CharArray::new([0_u8; 25usize]),
8640    };
8641    #[cfg(feature = "arbitrary")]
8642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8643        use arbitrary::{Arbitrary, Unstructured};
8644        let mut buf = [0u8; 1024];
8645        rng.fill_bytes(&mut buf);
8646        let mut unstructured = Unstructured::new(&buf);
8647        Self::arbitrary(&mut unstructured).unwrap_or_default()
8648    }
8649}
8650impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8651    fn default() -> Self {
8652        Self::DEFAULT.clone()
8653    }
8654}
8655impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8656    type Message = MavMessage;
8657    const ID: u32 = 5u32;
8658    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8659    const EXTRA_CRC: u8 = 217u8;
8660    const ENCODED_LEN: usize = 28usize;
8661    fn deser(
8662        _version: MavlinkVersion,
8663        __input: &[u8],
8664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8665        let avail_len = __input.len();
8666        let mut payload_buf = [0; Self::ENCODED_LEN];
8667        let mut buf = if avail_len < Self::ENCODED_LEN {
8668            payload_buf[0..avail_len].copy_from_slice(__input);
8669            Bytes::new(&payload_buf)
8670        } else {
8671            Bytes::new(__input)
8672        };
8673        let mut __struct = Self::default();
8674        __struct.target_system = buf.get_u8()?;
8675        __struct.control_request = buf.get_u8()?;
8676        __struct.version = buf.get_u8()?;
8677        let mut tmp = [0_u8; 25usize];
8678        for v in &mut tmp {
8679            *v = buf.get_u8()?;
8680        }
8681        __struct.passkey = CharArray::new(tmp);
8682        Ok(__struct)
8683    }
8684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8685        let mut __tmp = BytesMut::new(bytes);
8686        #[allow(clippy::absurd_extreme_comparisons)]
8687        #[allow(unused_comparisons)]
8688        if __tmp.remaining() < Self::ENCODED_LEN {
8689            panic!(
8690                "buffer is too small (need {} bytes, but got {})",
8691                Self::ENCODED_LEN,
8692                __tmp.remaining(),
8693            )
8694        }
8695        __tmp.put_u8(self.target_system);
8696        __tmp.put_u8(self.control_request);
8697        __tmp.put_u8(self.version);
8698        for val in &self.passkey {
8699            __tmp.put_u8(*val);
8700        }
8701        if matches!(version, MavlinkVersion::V2) {
8702            let len = __tmp.len();
8703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8704        } else {
8705            __tmp.len()
8706        }
8707    }
8708}
8709#[doc = "Accept / deny control of this MAV."]
8710#[doc = ""]
8711#[doc = "ID: 6"]
8712#[derive(Debug, Clone, PartialEq)]
8713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8715#[cfg_attr(feature = "ts", derive(TS))]
8716#[cfg_attr(feature = "ts", ts(export))]
8717pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8718    #[doc = "ID of the GCS this message"]
8719    pub gcs_system_id: u8,
8720    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8721    pub control_request: u8,
8722    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8723    pub ack: u8,
8724}
8725impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8726    pub const ENCODED_LEN: usize = 3usize;
8727    pub const DEFAULT: Self = Self {
8728        gcs_system_id: 0_u8,
8729        control_request: 0_u8,
8730        ack: 0_u8,
8731    };
8732    #[cfg(feature = "arbitrary")]
8733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8734        use arbitrary::{Arbitrary, Unstructured};
8735        let mut buf = [0u8; 1024];
8736        rng.fill_bytes(&mut buf);
8737        let mut unstructured = Unstructured::new(&buf);
8738        Self::arbitrary(&mut unstructured).unwrap_or_default()
8739    }
8740}
8741impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8742    fn default() -> Self {
8743        Self::DEFAULT.clone()
8744    }
8745}
8746impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8747    type Message = MavMessage;
8748    const ID: u32 = 6u32;
8749    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8750    const EXTRA_CRC: u8 = 104u8;
8751    const ENCODED_LEN: usize = 3usize;
8752    fn deser(
8753        _version: MavlinkVersion,
8754        __input: &[u8],
8755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8756        let avail_len = __input.len();
8757        let mut payload_buf = [0; Self::ENCODED_LEN];
8758        let mut buf = if avail_len < Self::ENCODED_LEN {
8759            payload_buf[0..avail_len].copy_from_slice(__input);
8760            Bytes::new(&payload_buf)
8761        } else {
8762            Bytes::new(__input)
8763        };
8764        let mut __struct = Self::default();
8765        __struct.gcs_system_id = buf.get_u8()?;
8766        __struct.control_request = buf.get_u8()?;
8767        __struct.ack = buf.get_u8()?;
8768        Ok(__struct)
8769    }
8770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8771        let mut __tmp = BytesMut::new(bytes);
8772        #[allow(clippy::absurd_extreme_comparisons)]
8773        #[allow(unused_comparisons)]
8774        if __tmp.remaining() < Self::ENCODED_LEN {
8775            panic!(
8776                "buffer is too small (need {} bytes, but got {})",
8777                Self::ENCODED_LEN,
8778                __tmp.remaining(),
8779            )
8780        }
8781        __tmp.put_u8(self.gcs_system_id);
8782        __tmp.put_u8(self.control_request);
8783        __tmp.put_u8(self.ack);
8784        if matches!(version, MavlinkVersion::V2) {
8785            let len = __tmp.len();
8786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8787        } else {
8788            __tmp.len()
8789        }
8790    }
8791}
8792#[doc = "Information about a potential collision."]
8793#[doc = ""]
8794#[doc = "ID: 247"]
8795#[derive(Debug, Clone, PartialEq)]
8796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8798#[cfg_attr(feature = "ts", derive(TS))]
8799#[cfg_attr(feature = "ts", ts(export))]
8800pub struct COLLISION_DATA {
8801    #[doc = "Unique identifier, domain based on src field"]
8802    pub id: u32,
8803    #[doc = "Estimated time until collision occurs"]
8804    pub time_to_minimum_delta: f32,
8805    #[doc = "Closest vertical distance between vehicle and object"]
8806    pub altitude_minimum_delta: f32,
8807    #[doc = "Closest horizontal distance between vehicle and object"]
8808    pub horizontal_minimum_delta: f32,
8809    #[doc = "Collision data source"]
8810    pub src: MavCollisionSrc,
8811    #[doc = "Action that is being taken to avoid this collision"]
8812    pub action: MavCollisionAction,
8813    #[doc = "How concerned the aircraft is about this collision"]
8814    pub threat_level: MavCollisionThreatLevel,
8815}
8816impl COLLISION_DATA {
8817    pub const ENCODED_LEN: usize = 19usize;
8818    pub const DEFAULT: Self = Self {
8819        id: 0_u32,
8820        time_to_minimum_delta: 0.0_f32,
8821        altitude_minimum_delta: 0.0_f32,
8822        horizontal_minimum_delta: 0.0_f32,
8823        src: MavCollisionSrc::DEFAULT,
8824        action: MavCollisionAction::DEFAULT,
8825        threat_level: MavCollisionThreatLevel::DEFAULT,
8826    };
8827    #[cfg(feature = "arbitrary")]
8828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8829        use arbitrary::{Arbitrary, Unstructured};
8830        let mut buf = [0u8; 1024];
8831        rng.fill_bytes(&mut buf);
8832        let mut unstructured = Unstructured::new(&buf);
8833        Self::arbitrary(&mut unstructured).unwrap_or_default()
8834    }
8835}
8836impl Default for COLLISION_DATA {
8837    fn default() -> Self {
8838        Self::DEFAULT.clone()
8839    }
8840}
8841impl MessageData for COLLISION_DATA {
8842    type Message = MavMessage;
8843    const ID: u32 = 247u32;
8844    const NAME: &'static str = "COLLISION";
8845    const EXTRA_CRC: u8 = 81u8;
8846    const ENCODED_LEN: usize = 19usize;
8847    fn deser(
8848        _version: MavlinkVersion,
8849        __input: &[u8],
8850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8851        let avail_len = __input.len();
8852        let mut payload_buf = [0; Self::ENCODED_LEN];
8853        let mut buf = if avail_len < Self::ENCODED_LEN {
8854            payload_buf[0..avail_len].copy_from_slice(__input);
8855            Bytes::new(&payload_buf)
8856        } else {
8857            Bytes::new(__input)
8858        };
8859        let mut __struct = Self::default();
8860        __struct.id = buf.get_u32_le()?;
8861        __struct.time_to_minimum_delta = buf.get_f32_le()?;
8862        __struct.altitude_minimum_delta = buf.get_f32_le()?;
8863        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
8864        let tmp = buf.get_u8()?;
8865        __struct.src =
8866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8867                enum_type: "MavCollisionSrc",
8868                value: tmp as u64,
8869            })?;
8870        let tmp = buf.get_u8()?;
8871        __struct.action =
8872            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8873                enum_type: "MavCollisionAction",
8874                value: tmp as u64,
8875            })?;
8876        let tmp = buf.get_u8()?;
8877        __struct.threat_level =
8878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8879                enum_type: "MavCollisionThreatLevel",
8880                value: tmp as u64,
8881            })?;
8882        Ok(__struct)
8883    }
8884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8885        let mut __tmp = BytesMut::new(bytes);
8886        #[allow(clippy::absurd_extreme_comparisons)]
8887        #[allow(unused_comparisons)]
8888        if __tmp.remaining() < Self::ENCODED_LEN {
8889            panic!(
8890                "buffer is too small (need {} bytes, but got {})",
8891                Self::ENCODED_LEN,
8892                __tmp.remaining(),
8893            )
8894        }
8895        __tmp.put_u32_le(self.id);
8896        __tmp.put_f32_le(self.time_to_minimum_delta);
8897        __tmp.put_f32_le(self.altitude_minimum_delta);
8898        __tmp.put_f32_le(self.horizontal_minimum_delta);
8899        __tmp.put_u8(self.src as u8);
8900        __tmp.put_u8(self.action as u8);
8901        __tmp.put_u8(self.threat_level as u8);
8902        if matches!(version, MavlinkVersion::V2) {
8903            let len = __tmp.len();
8904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8905        } else {
8906            __tmp.len()
8907        }
8908    }
8909}
8910#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8911#[doc = ""]
8912#[doc = "ID: 77"]
8913#[derive(Debug, Clone, PartialEq)]
8914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8916#[cfg_attr(feature = "ts", derive(TS))]
8917#[cfg_attr(feature = "ts", ts(export))]
8918pub struct COMMAND_ACK_DATA {
8919    #[doc = "Command ID (of acknowledged command)."]
8920    pub command: MavCmd,
8921    #[doc = "Result of command."]
8922    pub result: MavResult,
8923    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8925    pub progress: u8,
8926    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8928    pub result_param2: i32,
8929    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8931    pub target_system: u8,
8932    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8934    pub target_component: u8,
8935}
8936impl COMMAND_ACK_DATA {
8937    pub const ENCODED_LEN: usize = 10usize;
8938    pub const DEFAULT: Self = Self {
8939        command: MavCmd::DEFAULT,
8940        result: MavResult::DEFAULT,
8941        progress: 0_u8,
8942        result_param2: 0_i32,
8943        target_system: 0_u8,
8944        target_component: 0_u8,
8945    };
8946    #[cfg(feature = "arbitrary")]
8947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8948        use arbitrary::{Arbitrary, Unstructured};
8949        let mut buf = [0u8; 1024];
8950        rng.fill_bytes(&mut buf);
8951        let mut unstructured = Unstructured::new(&buf);
8952        Self::arbitrary(&mut unstructured).unwrap_or_default()
8953    }
8954}
8955impl Default for COMMAND_ACK_DATA {
8956    fn default() -> Self {
8957        Self::DEFAULT.clone()
8958    }
8959}
8960impl MessageData for COMMAND_ACK_DATA {
8961    type Message = MavMessage;
8962    const ID: u32 = 77u32;
8963    const NAME: &'static str = "COMMAND_ACK";
8964    const EXTRA_CRC: u8 = 143u8;
8965    const ENCODED_LEN: usize = 10usize;
8966    fn deser(
8967        _version: MavlinkVersion,
8968        __input: &[u8],
8969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8970        let avail_len = __input.len();
8971        let mut payload_buf = [0; Self::ENCODED_LEN];
8972        let mut buf = if avail_len < Self::ENCODED_LEN {
8973            payload_buf[0..avail_len].copy_from_slice(__input);
8974            Bytes::new(&payload_buf)
8975        } else {
8976            Bytes::new(__input)
8977        };
8978        let mut __struct = Self::default();
8979        let tmp = buf.get_u16_le()?;
8980        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8981            ::mavlink_core::error::ParserError::InvalidEnum {
8982                enum_type: "MavCmd",
8983                value: tmp as u64,
8984            },
8985        )?;
8986        let tmp = buf.get_u8()?;
8987        __struct.result =
8988            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8989                enum_type: "MavResult",
8990                value: tmp as u64,
8991            })?;
8992        __struct.progress = buf.get_u8()?;
8993        __struct.result_param2 = buf.get_i32_le()?;
8994        __struct.target_system = buf.get_u8()?;
8995        __struct.target_component = buf.get_u8()?;
8996        Ok(__struct)
8997    }
8998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8999        let mut __tmp = BytesMut::new(bytes);
9000        #[allow(clippy::absurd_extreme_comparisons)]
9001        #[allow(unused_comparisons)]
9002        if __tmp.remaining() < Self::ENCODED_LEN {
9003            panic!(
9004                "buffer is too small (need {} bytes, but got {})",
9005                Self::ENCODED_LEN,
9006                __tmp.remaining(),
9007            )
9008        }
9009        __tmp.put_u16_le(self.command as u16);
9010        __tmp.put_u8(self.result as u8);
9011        if matches!(version, MavlinkVersion::V2) {
9012            __tmp.put_u8(self.progress);
9013            __tmp.put_i32_le(self.result_param2);
9014            __tmp.put_u8(self.target_system);
9015            __tmp.put_u8(self.target_component);
9016            let len = __tmp.len();
9017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9018        } else {
9019            __tmp.len()
9020        }
9021    }
9022}
9023#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9024#[doc = ""]
9025#[doc = "ID: 80"]
9026#[derive(Debug, Clone, PartialEq)]
9027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9029#[cfg_attr(feature = "ts", derive(TS))]
9030#[cfg_attr(feature = "ts", ts(export))]
9031pub struct COMMAND_CANCEL_DATA {
9032    #[doc = "Command ID (of command to cancel)."]
9033    pub command: MavCmd,
9034    #[doc = "System executing long running command. Should not be broadcast (0)."]
9035    pub target_system: u8,
9036    #[doc = "Component executing long running command."]
9037    pub target_component: u8,
9038}
9039impl COMMAND_CANCEL_DATA {
9040    pub const ENCODED_LEN: usize = 4usize;
9041    pub const DEFAULT: Self = Self {
9042        command: MavCmd::DEFAULT,
9043        target_system: 0_u8,
9044        target_component: 0_u8,
9045    };
9046    #[cfg(feature = "arbitrary")]
9047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9048        use arbitrary::{Arbitrary, Unstructured};
9049        let mut buf = [0u8; 1024];
9050        rng.fill_bytes(&mut buf);
9051        let mut unstructured = Unstructured::new(&buf);
9052        Self::arbitrary(&mut unstructured).unwrap_or_default()
9053    }
9054}
9055impl Default for COMMAND_CANCEL_DATA {
9056    fn default() -> Self {
9057        Self::DEFAULT.clone()
9058    }
9059}
9060impl MessageData for COMMAND_CANCEL_DATA {
9061    type Message = MavMessage;
9062    const ID: u32 = 80u32;
9063    const NAME: &'static str = "COMMAND_CANCEL";
9064    const EXTRA_CRC: u8 = 14u8;
9065    const ENCODED_LEN: usize = 4usize;
9066    fn deser(
9067        _version: MavlinkVersion,
9068        __input: &[u8],
9069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9070        let avail_len = __input.len();
9071        let mut payload_buf = [0; Self::ENCODED_LEN];
9072        let mut buf = if avail_len < Self::ENCODED_LEN {
9073            payload_buf[0..avail_len].copy_from_slice(__input);
9074            Bytes::new(&payload_buf)
9075        } else {
9076            Bytes::new(__input)
9077        };
9078        let mut __struct = Self::default();
9079        let tmp = buf.get_u16_le()?;
9080        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9081            ::mavlink_core::error::ParserError::InvalidEnum {
9082                enum_type: "MavCmd",
9083                value: tmp as u64,
9084            },
9085        )?;
9086        __struct.target_system = buf.get_u8()?;
9087        __struct.target_component = buf.get_u8()?;
9088        Ok(__struct)
9089    }
9090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9091        let mut __tmp = BytesMut::new(bytes);
9092        #[allow(clippy::absurd_extreme_comparisons)]
9093        #[allow(unused_comparisons)]
9094        if __tmp.remaining() < Self::ENCODED_LEN {
9095            panic!(
9096                "buffer is too small (need {} bytes, but got {})",
9097                Self::ENCODED_LEN,
9098                __tmp.remaining(),
9099            )
9100        }
9101        __tmp.put_u16_le(self.command as u16);
9102        __tmp.put_u8(self.target_system);
9103        __tmp.put_u8(self.target_component);
9104        if matches!(version, MavlinkVersion::V2) {
9105            let len = __tmp.len();
9106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9107        } else {
9108            __tmp.len()
9109        }
9110    }
9111}
9112#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9113#[doc = ""]
9114#[doc = "ID: 75"]
9115#[derive(Debug, Clone, PartialEq)]
9116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9118#[cfg_attr(feature = "ts", derive(TS))]
9119#[cfg_attr(feature = "ts", ts(export))]
9120pub struct COMMAND_INT_DATA {
9121    #[doc = "PARAM1, see MAV_CMD enum"]
9122    pub param1: f32,
9123    #[doc = "PARAM2, see MAV_CMD enum"]
9124    pub param2: f32,
9125    #[doc = "PARAM3, see MAV_CMD enum"]
9126    pub param3: f32,
9127    #[doc = "PARAM4, see MAV_CMD enum"]
9128    pub param4: f32,
9129    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9130    pub x: i32,
9131    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9132    pub y: i32,
9133    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9134    pub z: f32,
9135    #[doc = "The scheduled action for the mission item."]
9136    pub command: MavCmd,
9137    #[doc = "System ID"]
9138    pub target_system: u8,
9139    #[doc = "Component ID"]
9140    pub target_component: u8,
9141    #[doc = "The coordinate system of the COMMAND."]
9142    pub frame: MavFrame,
9143    #[doc = "Not used."]
9144    pub current: u8,
9145    #[doc = "Not used (set 0)."]
9146    pub autocontinue: u8,
9147}
9148impl COMMAND_INT_DATA {
9149    pub const ENCODED_LEN: usize = 35usize;
9150    pub const DEFAULT: Self = Self {
9151        param1: 0.0_f32,
9152        param2: 0.0_f32,
9153        param3: 0.0_f32,
9154        param4: 0.0_f32,
9155        x: 0_i32,
9156        y: 0_i32,
9157        z: 0.0_f32,
9158        command: MavCmd::DEFAULT,
9159        target_system: 0_u8,
9160        target_component: 0_u8,
9161        frame: MavFrame::DEFAULT,
9162        current: 0_u8,
9163        autocontinue: 0_u8,
9164    };
9165    #[cfg(feature = "arbitrary")]
9166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9167        use arbitrary::{Arbitrary, Unstructured};
9168        let mut buf = [0u8; 1024];
9169        rng.fill_bytes(&mut buf);
9170        let mut unstructured = Unstructured::new(&buf);
9171        Self::arbitrary(&mut unstructured).unwrap_or_default()
9172    }
9173}
9174impl Default for COMMAND_INT_DATA {
9175    fn default() -> Self {
9176        Self::DEFAULT.clone()
9177    }
9178}
9179impl MessageData for COMMAND_INT_DATA {
9180    type Message = MavMessage;
9181    const ID: u32 = 75u32;
9182    const NAME: &'static str = "COMMAND_INT";
9183    const EXTRA_CRC: u8 = 158u8;
9184    const ENCODED_LEN: usize = 35usize;
9185    fn deser(
9186        _version: MavlinkVersion,
9187        __input: &[u8],
9188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9189        let avail_len = __input.len();
9190        let mut payload_buf = [0; Self::ENCODED_LEN];
9191        let mut buf = if avail_len < Self::ENCODED_LEN {
9192            payload_buf[0..avail_len].copy_from_slice(__input);
9193            Bytes::new(&payload_buf)
9194        } else {
9195            Bytes::new(__input)
9196        };
9197        let mut __struct = Self::default();
9198        __struct.param1 = buf.get_f32_le()?;
9199        __struct.param2 = buf.get_f32_le()?;
9200        __struct.param3 = buf.get_f32_le()?;
9201        __struct.param4 = buf.get_f32_le()?;
9202        __struct.x = buf.get_i32_le()?;
9203        __struct.y = buf.get_i32_le()?;
9204        __struct.z = buf.get_f32_le()?;
9205        let tmp = buf.get_u16_le()?;
9206        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9207            ::mavlink_core::error::ParserError::InvalidEnum {
9208                enum_type: "MavCmd",
9209                value: tmp as u64,
9210            },
9211        )?;
9212        __struct.target_system = buf.get_u8()?;
9213        __struct.target_component = buf.get_u8()?;
9214        let tmp = buf.get_u8()?;
9215        __struct.frame =
9216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9217                enum_type: "MavFrame",
9218                value: tmp as u64,
9219            })?;
9220        __struct.current = buf.get_u8()?;
9221        __struct.autocontinue = buf.get_u8()?;
9222        Ok(__struct)
9223    }
9224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9225        let mut __tmp = BytesMut::new(bytes);
9226        #[allow(clippy::absurd_extreme_comparisons)]
9227        #[allow(unused_comparisons)]
9228        if __tmp.remaining() < Self::ENCODED_LEN {
9229            panic!(
9230                "buffer is too small (need {} bytes, but got {})",
9231                Self::ENCODED_LEN,
9232                __tmp.remaining(),
9233            )
9234        }
9235        __tmp.put_f32_le(self.param1);
9236        __tmp.put_f32_le(self.param2);
9237        __tmp.put_f32_le(self.param3);
9238        __tmp.put_f32_le(self.param4);
9239        __tmp.put_i32_le(self.x);
9240        __tmp.put_i32_le(self.y);
9241        __tmp.put_f32_le(self.z);
9242        __tmp.put_u16_le(self.command as u16);
9243        __tmp.put_u8(self.target_system);
9244        __tmp.put_u8(self.target_component);
9245        __tmp.put_u8(self.frame as u8);
9246        __tmp.put_u8(self.current);
9247        __tmp.put_u8(self.autocontinue);
9248        if matches!(version, MavlinkVersion::V2) {
9249            let len = __tmp.len();
9250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9251        } else {
9252            __tmp.len()
9253        }
9254    }
9255}
9256#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9257#[doc = ""]
9258#[doc = "ID: 76"]
9259#[derive(Debug, Clone, PartialEq)]
9260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9262#[cfg_attr(feature = "ts", derive(TS))]
9263#[cfg_attr(feature = "ts", ts(export))]
9264pub struct COMMAND_LONG_DATA {
9265    #[doc = "Parameter 1 (for the specific command)."]
9266    pub param1: f32,
9267    #[doc = "Parameter 2 (for the specific command)."]
9268    pub param2: f32,
9269    #[doc = "Parameter 3 (for the specific command)."]
9270    pub param3: f32,
9271    #[doc = "Parameter 4 (for the specific command)."]
9272    pub param4: f32,
9273    #[doc = "Parameter 5 (for the specific command)."]
9274    pub param5: f32,
9275    #[doc = "Parameter 6 (for the specific command)."]
9276    pub param6: f32,
9277    #[doc = "Parameter 7 (for the specific command)."]
9278    pub param7: f32,
9279    #[doc = "Command ID (of command to send)."]
9280    pub command: MavCmd,
9281    #[doc = "System which should execute the command"]
9282    pub target_system: u8,
9283    #[doc = "Component which should execute the command, 0 for all components"]
9284    pub target_component: u8,
9285    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9286    pub confirmation: u8,
9287}
9288impl COMMAND_LONG_DATA {
9289    pub const ENCODED_LEN: usize = 33usize;
9290    pub const DEFAULT: Self = Self {
9291        param1: 0.0_f32,
9292        param2: 0.0_f32,
9293        param3: 0.0_f32,
9294        param4: 0.0_f32,
9295        param5: 0.0_f32,
9296        param6: 0.0_f32,
9297        param7: 0.0_f32,
9298        command: MavCmd::DEFAULT,
9299        target_system: 0_u8,
9300        target_component: 0_u8,
9301        confirmation: 0_u8,
9302    };
9303    #[cfg(feature = "arbitrary")]
9304    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9305        use arbitrary::{Arbitrary, Unstructured};
9306        let mut buf = [0u8; 1024];
9307        rng.fill_bytes(&mut buf);
9308        let mut unstructured = Unstructured::new(&buf);
9309        Self::arbitrary(&mut unstructured).unwrap_or_default()
9310    }
9311}
9312impl Default for COMMAND_LONG_DATA {
9313    fn default() -> Self {
9314        Self::DEFAULT.clone()
9315    }
9316}
9317impl MessageData for COMMAND_LONG_DATA {
9318    type Message = MavMessage;
9319    const ID: u32 = 76u32;
9320    const NAME: &'static str = "COMMAND_LONG";
9321    const EXTRA_CRC: u8 = 152u8;
9322    const ENCODED_LEN: usize = 33usize;
9323    fn deser(
9324        _version: MavlinkVersion,
9325        __input: &[u8],
9326    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9327        let avail_len = __input.len();
9328        let mut payload_buf = [0; Self::ENCODED_LEN];
9329        let mut buf = if avail_len < Self::ENCODED_LEN {
9330            payload_buf[0..avail_len].copy_from_slice(__input);
9331            Bytes::new(&payload_buf)
9332        } else {
9333            Bytes::new(__input)
9334        };
9335        let mut __struct = Self::default();
9336        __struct.param1 = buf.get_f32_le()?;
9337        __struct.param2 = buf.get_f32_le()?;
9338        __struct.param3 = buf.get_f32_le()?;
9339        __struct.param4 = buf.get_f32_le()?;
9340        __struct.param5 = buf.get_f32_le()?;
9341        __struct.param6 = buf.get_f32_le()?;
9342        __struct.param7 = buf.get_f32_le()?;
9343        let tmp = buf.get_u16_le()?;
9344        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9345            ::mavlink_core::error::ParserError::InvalidEnum {
9346                enum_type: "MavCmd",
9347                value: tmp as u64,
9348            },
9349        )?;
9350        __struct.target_system = buf.get_u8()?;
9351        __struct.target_component = buf.get_u8()?;
9352        __struct.confirmation = buf.get_u8()?;
9353        Ok(__struct)
9354    }
9355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9356        let mut __tmp = BytesMut::new(bytes);
9357        #[allow(clippy::absurd_extreme_comparisons)]
9358        #[allow(unused_comparisons)]
9359        if __tmp.remaining() < Self::ENCODED_LEN {
9360            panic!(
9361                "buffer is too small (need {} bytes, but got {})",
9362                Self::ENCODED_LEN,
9363                __tmp.remaining(),
9364            )
9365        }
9366        __tmp.put_f32_le(self.param1);
9367        __tmp.put_f32_le(self.param2);
9368        __tmp.put_f32_le(self.param3);
9369        __tmp.put_f32_le(self.param4);
9370        __tmp.put_f32_le(self.param5);
9371        __tmp.put_f32_le(self.param6);
9372        __tmp.put_f32_le(self.param7);
9373        __tmp.put_u16_le(self.command as u16);
9374        __tmp.put_u8(self.target_system);
9375        __tmp.put_u8(self.target_component);
9376        __tmp.put_u8(self.confirmation);
9377        if matches!(version, MavlinkVersion::V2) {
9378            let len = __tmp.len();
9379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9380        } else {
9381            __tmp.len()
9382        }
9383    }
9384}
9385#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9386#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9387#[doc = ""]
9388#[doc = "ID: 395"]
9389#[derive(Debug, Clone, PartialEq)]
9390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9392#[cfg_attr(feature = "ts", derive(TS))]
9393#[cfg_attr(feature = "ts", ts(export))]
9394pub struct COMPONENT_INFORMATION_DATA {
9395    #[doc = "Timestamp (time since system boot)."]
9396    pub time_boot_ms: u32,
9397    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9398    pub general_metadata_file_crc: u32,
9399    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9400    pub peripherals_metadata_file_crc: u32,
9401    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9402    #[cfg_attr(feature = "ts", ts(type = "string"))]
9403    pub general_metadata_uri: CharArray<100>,
9404    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9405    #[cfg_attr(feature = "ts", ts(type = "string"))]
9406    pub peripherals_metadata_uri: CharArray<100>,
9407}
9408impl COMPONENT_INFORMATION_DATA {
9409    pub const ENCODED_LEN: usize = 212usize;
9410    pub const DEFAULT: Self = Self {
9411        time_boot_ms: 0_u32,
9412        general_metadata_file_crc: 0_u32,
9413        peripherals_metadata_file_crc: 0_u32,
9414        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9415        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9416    };
9417    #[cfg(feature = "arbitrary")]
9418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9419        use arbitrary::{Arbitrary, Unstructured};
9420        let mut buf = [0u8; 1024];
9421        rng.fill_bytes(&mut buf);
9422        let mut unstructured = Unstructured::new(&buf);
9423        Self::arbitrary(&mut unstructured).unwrap_or_default()
9424    }
9425}
9426impl Default for COMPONENT_INFORMATION_DATA {
9427    fn default() -> Self {
9428        Self::DEFAULT.clone()
9429    }
9430}
9431impl MessageData for COMPONENT_INFORMATION_DATA {
9432    type Message = MavMessage;
9433    const ID: u32 = 395u32;
9434    const NAME: &'static str = "COMPONENT_INFORMATION";
9435    const EXTRA_CRC: u8 = 0u8;
9436    const ENCODED_LEN: usize = 212usize;
9437    fn deser(
9438        _version: MavlinkVersion,
9439        __input: &[u8],
9440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9441        let avail_len = __input.len();
9442        let mut payload_buf = [0; Self::ENCODED_LEN];
9443        let mut buf = if avail_len < Self::ENCODED_LEN {
9444            payload_buf[0..avail_len].copy_from_slice(__input);
9445            Bytes::new(&payload_buf)
9446        } else {
9447            Bytes::new(__input)
9448        };
9449        let mut __struct = Self::default();
9450        __struct.time_boot_ms = buf.get_u32_le()?;
9451        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9452        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9453        let mut tmp = [0_u8; 100usize];
9454        for v in &mut tmp {
9455            *v = buf.get_u8()?;
9456        }
9457        __struct.general_metadata_uri = CharArray::new(tmp);
9458        let mut tmp = [0_u8; 100usize];
9459        for v in &mut tmp {
9460            *v = buf.get_u8()?;
9461        }
9462        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9463        Ok(__struct)
9464    }
9465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9466        let mut __tmp = BytesMut::new(bytes);
9467        #[allow(clippy::absurd_extreme_comparisons)]
9468        #[allow(unused_comparisons)]
9469        if __tmp.remaining() < Self::ENCODED_LEN {
9470            panic!(
9471                "buffer is too small (need {} bytes, but got {})",
9472                Self::ENCODED_LEN,
9473                __tmp.remaining(),
9474            )
9475        }
9476        __tmp.put_u32_le(self.time_boot_ms);
9477        __tmp.put_u32_le(self.general_metadata_file_crc);
9478        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9479        for val in &self.general_metadata_uri {
9480            __tmp.put_u8(*val);
9481        }
9482        for val in &self.peripherals_metadata_uri {
9483            __tmp.put_u8(*val);
9484        }
9485        if matches!(version, MavlinkVersion::V2) {
9486            let len = __tmp.len();
9487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9488        } else {
9489            __tmp.len()
9490        }
9491    }
9492}
9493#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9494#[doc = ""]
9495#[doc = "ID: 396"]
9496#[derive(Debug, Clone, PartialEq)]
9497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9499#[cfg_attr(feature = "ts", derive(TS))]
9500#[cfg_attr(feature = "ts", ts(export))]
9501pub struct COMPONENT_INFORMATION_BASIC_DATA {
9502    #[doc = "Component capability flags"]
9503    pub capabilities: MavProtocolCapability,
9504    #[doc = "Timestamp (time since system boot)."]
9505    pub time_boot_ms: u32,
9506    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9507    pub time_manufacture_s: u32,
9508    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9509    #[cfg_attr(feature = "ts", ts(type = "string"))]
9510    pub vendor_name: CharArray<32>,
9511    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9512    #[cfg_attr(feature = "ts", ts(type = "string"))]
9513    pub model_name: CharArray<32>,
9514    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9515    #[cfg_attr(feature = "ts", ts(type = "string"))]
9516    pub software_version: CharArray<24>,
9517    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9518    #[cfg_attr(feature = "ts", ts(type = "string"))]
9519    pub hardware_version: CharArray<24>,
9520    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9521    #[cfg_attr(feature = "ts", ts(type = "string"))]
9522    pub serial_number: CharArray<32>,
9523}
9524impl COMPONENT_INFORMATION_BASIC_DATA {
9525    pub const ENCODED_LEN: usize = 160usize;
9526    pub const DEFAULT: Self = Self {
9527        capabilities: MavProtocolCapability::DEFAULT,
9528        time_boot_ms: 0_u32,
9529        time_manufacture_s: 0_u32,
9530        vendor_name: CharArray::new([0_u8; 32usize]),
9531        model_name: CharArray::new([0_u8; 32usize]),
9532        software_version: CharArray::new([0_u8; 24usize]),
9533        hardware_version: CharArray::new([0_u8; 24usize]),
9534        serial_number: CharArray::new([0_u8; 32usize]),
9535    };
9536    #[cfg(feature = "arbitrary")]
9537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9538        use arbitrary::{Arbitrary, Unstructured};
9539        let mut buf = [0u8; 1024];
9540        rng.fill_bytes(&mut buf);
9541        let mut unstructured = Unstructured::new(&buf);
9542        Self::arbitrary(&mut unstructured).unwrap_or_default()
9543    }
9544}
9545impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9546    fn default() -> Self {
9547        Self::DEFAULT.clone()
9548    }
9549}
9550impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9551    type Message = MavMessage;
9552    const ID: u32 = 396u32;
9553    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9554    const EXTRA_CRC: u8 = 50u8;
9555    const ENCODED_LEN: usize = 160usize;
9556    fn deser(
9557        _version: MavlinkVersion,
9558        __input: &[u8],
9559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9560        let avail_len = __input.len();
9561        let mut payload_buf = [0; Self::ENCODED_LEN];
9562        let mut buf = if avail_len < Self::ENCODED_LEN {
9563            payload_buf[0..avail_len].copy_from_slice(__input);
9564            Bytes::new(&payload_buf)
9565        } else {
9566            Bytes::new(__input)
9567        };
9568        let mut __struct = Self::default();
9569        let tmp = buf.get_u64_le()?;
9570        __struct.capabilities = MavProtocolCapability::from_bits(
9571            tmp as <MavProtocolCapability as Flags>::Bits,
9572        )
9573        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9574            flag_type: "MavProtocolCapability",
9575            value: tmp as u64,
9576        })?;
9577        __struct.time_boot_ms = buf.get_u32_le()?;
9578        __struct.time_manufacture_s = buf.get_u32_le()?;
9579        let mut tmp = [0_u8; 32usize];
9580        for v in &mut tmp {
9581            *v = buf.get_u8()?;
9582        }
9583        __struct.vendor_name = CharArray::new(tmp);
9584        let mut tmp = [0_u8; 32usize];
9585        for v in &mut tmp {
9586            *v = buf.get_u8()?;
9587        }
9588        __struct.model_name = CharArray::new(tmp);
9589        let mut tmp = [0_u8; 24usize];
9590        for v in &mut tmp {
9591            *v = buf.get_u8()?;
9592        }
9593        __struct.software_version = CharArray::new(tmp);
9594        let mut tmp = [0_u8; 24usize];
9595        for v in &mut tmp {
9596            *v = buf.get_u8()?;
9597        }
9598        __struct.hardware_version = CharArray::new(tmp);
9599        let mut tmp = [0_u8; 32usize];
9600        for v in &mut tmp {
9601            *v = buf.get_u8()?;
9602        }
9603        __struct.serial_number = CharArray::new(tmp);
9604        Ok(__struct)
9605    }
9606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9607        let mut __tmp = BytesMut::new(bytes);
9608        #[allow(clippy::absurd_extreme_comparisons)]
9609        #[allow(unused_comparisons)]
9610        if __tmp.remaining() < Self::ENCODED_LEN {
9611            panic!(
9612                "buffer is too small (need {} bytes, but got {})",
9613                Self::ENCODED_LEN,
9614                __tmp.remaining(),
9615            )
9616        }
9617        __tmp.put_u64_le(self.capabilities.bits() as u64);
9618        __tmp.put_u32_le(self.time_boot_ms);
9619        __tmp.put_u32_le(self.time_manufacture_s);
9620        for val in &self.vendor_name {
9621            __tmp.put_u8(*val);
9622        }
9623        for val in &self.model_name {
9624            __tmp.put_u8(*val);
9625        }
9626        for val in &self.software_version {
9627            __tmp.put_u8(*val);
9628        }
9629        for val in &self.hardware_version {
9630            __tmp.put_u8(*val);
9631        }
9632        for val in &self.serial_number {
9633            __tmp.put_u8(*val);
9634        }
9635        if matches!(version, MavlinkVersion::V2) {
9636            let len = __tmp.len();
9637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9638        } else {
9639            __tmp.len()
9640        }
9641    }
9642}
9643#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9644#[doc = ""]
9645#[doc = "ID: 397"]
9646#[derive(Debug, Clone, PartialEq)]
9647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9649#[cfg_attr(feature = "ts", derive(TS))]
9650#[cfg_attr(feature = "ts", ts(export))]
9651pub struct COMPONENT_METADATA_DATA {
9652    #[doc = "Timestamp (time since system boot)."]
9653    pub time_boot_ms: u32,
9654    #[doc = "CRC32 of the general metadata file."]
9655    pub file_crc: u32,
9656    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9657    #[cfg_attr(feature = "ts", ts(type = "string"))]
9658    pub uri: CharArray<100>,
9659}
9660impl COMPONENT_METADATA_DATA {
9661    pub const ENCODED_LEN: usize = 108usize;
9662    pub const DEFAULT: Self = Self {
9663        time_boot_ms: 0_u32,
9664        file_crc: 0_u32,
9665        uri: CharArray::new([0_u8; 100usize]),
9666    };
9667    #[cfg(feature = "arbitrary")]
9668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9669        use arbitrary::{Arbitrary, Unstructured};
9670        let mut buf = [0u8; 1024];
9671        rng.fill_bytes(&mut buf);
9672        let mut unstructured = Unstructured::new(&buf);
9673        Self::arbitrary(&mut unstructured).unwrap_or_default()
9674    }
9675}
9676impl Default for COMPONENT_METADATA_DATA {
9677    fn default() -> Self {
9678        Self::DEFAULT.clone()
9679    }
9680}
9681impl MessageData for COMPONENT_METADATA_DATA {
9682    type Message = MavMessage;
9683    const ID: u32 = 397u32;
9684    const NAME: &'static str = "COMPONENT_METADATA";
9685    const EXTRA_CRC: u8 = 182u8;
9686    const ENCODED_LEN: usize = 108usize;
9687    fn deser(
9688        _version: MavlinkVersion,
9689        __input: &[u8],
9690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9691        let avail_len = __input.len();
9692        let mut payload_buf = [0; Self::ENCODED_LEN];
9693        let mut buf = if avail_len < Self::ENCODED_LEN {
9694            payload_buf[0..avail_len].copy_from_slice(__input);
9695            Bytes::new(&payload_buf)
9696        } else {
9697            Bytes::new(__input)
9698        };
9699        let mut __struct = Self::default();
9700        __struct.time_boot_ms = buf.get_u32_le()?;
9701        __struct.file_crc = buf.get_u32_le()?;
9702        let mut tmp = [0_u8; 100usize];
9703        for v in &mut tmp {
9704            *v = buf.get_u8()?;
9705        }
9706        __struct.uri = CharArray::new(tmp);
9707        Ok(__struct)
9708    }
9709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9710        let mut __tmp = BytesMut::new(bytes);
9711        #[allow(clippy::absurd_extreme_comparisons)]
9712        #[allow(unused_comparisons)]
9713        if __tmp.remaining() < Self::ENCODED_LEN {
9714            panic!(
9715                "buffer is too small (need {} bytes, but got {})",
9716                Self::ENCODED_LEN,
9717                __tmp.remaining(),
9718            )
9719        }
9720        __tmp.put_u32_le(self.time_boot_ms);
9721        __tmp.put_u32_le(self.file_crc);
9722        for val in &self.uri {
9723            __tmp.put_u8(*val);
9724        }
9725        if matches!(version, MavlinkVersion::V2) {
9726            let len = __tmp.len();
9727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9728        } else {
9729            __tmp.len()
9730        }
9731    }
9732}
9733#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9734#[doc = ""]
9735#[doc = "ID: 146"]
9736#[derive(Debug, Clone, PartialEq)]
9737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9739#[cfg_attr(feature = "ts", derive(TS))]
9740#[cfg_attr(feature = "ts", ts(export))]
9741pub struct CONTROL_SYSTEM_STATE_DATA {
9742    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9743    pub time_usec: u64,
9744    #[doc = "X acceleration in body frame"]
9745    pub x_acc: f32,
9746    #[doc = "Y acceleration in body frame"]
9747    pub y_acc: f32,
9748    #[doc = "Z acceleration in body frame"]
9749    pub z_acc: f32,
9750    #[doc = "X velocity in body frame"]
9751    pub x_vel: f32,
9752    #[doc = "Y velocity in body frame"]
9753    pub y_vel: f32,
9754    #[doc = "Z velocity in body frame"]
9755    pub z_vel: f32,
9756    #[doc = "X position in local frame"]
9757    pub x_pos: f32,
9758    #[doc = "Y position in local frame"]
9759    pub y_pos: f32,
9760    #[doc = "Z position in local frame"]
9761    pub z_pos: f32,
9762    #[doc = "Airspeed, set to -1 if unknown"]
9763    pub airspeed: f32,
9764    #[doc = "Variance of body velocity estimate"]
9765    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9766    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9767    pub vel_variance: [f32; 3],
9768    #[doc = "Variance in local position"]
9769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9770    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9771    pub pos_variance: [f32; 3],
9772    #[doc = "The attitude, represented as Quaternion"]
9773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9775    pub q: [f32; 4],
9776    #[doc = "Angular rate in roll axis"]
9777    pub roll_rate: f32,
9778    #[doc = "Angular rate in pitch axis"]
9779    pub pitch_rate: f32,
9780    #[doc = "Angular rate in yaw axis"]
9781    pub yaw_rate: f32,
9782}
9783impl CONTROL_SYSTEM_STATE_DATA {
9784    pub const ENCODED_LEN: usize = 100usize;
9785    pub const DEFAULT: Self = Self {
9786        time_usec: 0_u64,
9787        x_acc: 0.0_f32,
9788        y_acc: 0.0_f32,
9789        z_acc: 0.0_f32,
9790        x_vel: 0.0_f32,
9791        y_vel: 0.0_f32,
9792        z_vel: 0.0_f32,
9793        x_pos: 0.0_f32,
9794        y_pos: 0.0_f32,
9795        z_pos: 0.0_f32,
9796        airspeed: 0.0_f32,
9797        vel_variance: [0.0_f32; 3usize],
9798        pos_variance: [0.0_f32; 3usize],
9799        q: [0.0_f32; 4usize],
9800        roll_rate: 0.0_f32,
9801        pitch_rate: 0.0_f32,
9802        yaw_rate: 0.0_f32,
9803    };
9804    #[cfg(feature = "arbitrary")]
9805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9806        use arbitrary::{Arbitrary, Unstructured};
9807        let mut buf = [0u8; 1024];
9808        rng.fill_bytes(&mut buf);
9809        let mut unstructured = Unstructured::new(&buf);
9810        Self::arbitrary(&mut unstructured).unwrap_or_default()
9811    }
9812}
9813impl Default for CONTROL_SYSTEM_STATE_DATA {
9814    fn default() -> Self {
9815        Self::DEFAULT.clone()
9816    }
9817}
9818impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9819    type Message = MavMessage;
9820    const ID: u32 = 146u32;
9821    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9822    const EXTRA_CRC: u8 = 103u8;
9823    const ENCODED_LEN: usize = 100usize;
9824    fn deser(
9825        _version: MavlinkVersion,
9826        __input: &[u8],
9827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9828        let avail_len = __input.len();
9829        let mut payload_buf = [0; Self::ENCODED_LEN];
9830        let mut buf = if avail_len < Self::ENCODED_LEN {
9831            payload_buf[0..avail_len].copy_from_slice(__input);
9832            Bytes::new(&payload_buf)
9833        } else {
9834            Bytes::new(__input)
9835        };
9836        let mut __struct = Self::default();
9837        __struct.time_usec = buf.get_u64_le()?;
9838        __struct.x_acc = buf.get_f32_le()?;
9839        __struct.y_acc = buf.get_f32_le()?;
9840        __struct.z_acc = buf.get_f32_le()?;
9841        __struct.x_vel = buf.get_f32_le()?;
9842        __struct.y_vel = buf.get_f32_le()?;
9843        __struct.z_vel = buf.get_f32_le()?;
9844        __struct.x_pos = buf.get_f32_le()?;
9845        __struct.y_pos = buf.get_f32_le()?;
9846        __struct.z_pos = buf.get_f32_le()?;
9847        __struct.airspeed = buf.get_f32_le()?;
9848        for v in &mut __struct.vel_variance {
9849            let val = buf.get_f32_le()?;
9850            *v = val;
9851        }
9852        for v in &mut __struct.pos_variance {
9853            let val = buf.get_f32_le()?;
9854            *v = val;
9855        }
9856        for v in &mut __struct.q {
9857            let val = buf.get_f32_le()?;
9858            *v = val;
9859        }
9860        __struct.roll_rate = buf.get_f32_le()?;
9861        __struct.pitch_rate = buf.get_f32_le()?;
9862        __struct.yaw_rate = buf.get_f32_le()?;
9863        Ok(__struct)
9864    }
9865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9866        let mut __tmp = BytesMut::new(bytes);
9867        #[allow(clippy::absurd_extreme_comparisons)]
9868        #[allow(unused_comparisons)]
9869        if __tmp.remaining() < Self::ENCODED_LEN {
9870            panic!(
9871                "buffer is too small (need {} bytes, but got {})",
9872                Self::ENCODED_LEN,
9873                __tmp.remaining(),
9874            )
9875        }
9876        __tmp.put_u64_le(self.time_usec);
9877        __tmp.put_f32_le(self.x_acc);
9878        __tmp.put_f32_le(self.y_acc);
9879        __tmp.put_f32_le(self.z_acc);
9880        __tmp.put_f32_le(self.x_vel);
9881        __tmp.put_f32_le(self.y_vel);
9882        __tmp.put_f32_le(self.z_vel);
9883        __tmp.put_f32_le(self.x_pos);
9884        __tmp.put_f32_le(self.y_pos);
9885        __tmp.put_f32_le(self.z_pos);
9886        __tmp.put_f32_le(self.airspeed);
9887        for val in &self.vel_variance {
9888            __tmp.put_f32_le(*val);
9889        }
9890        for val in &self.pos_variance {
9891            __tmp.put_f32_le(*val);
9892        }
9893        for val in &self.q {
9894            __tmp.put_f32_le(*val);
9895        }
9896        __tmp.put_f32_le(self.roll_rate);
9897        __tmp.put_f32_le(self.pitch_rate);
9898        __tmp.put_f32_le(self.yaw_rate);
9899        if matches!(version, MavlinkVersion::V2) {
9900            let len = __tmp.len();
9901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9902        } else {
9903            __tmp.len()
9904        }
9905    }
9906}
9907#[doc = "offset response to encapsulated data."]
9908#[doc = ""]
9909#[doc = "ID: 50005"]
9910#[derive(Debug, Clone, PartialEq)]
9911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9913#[cfg_attr(feature = "ts", derive(TS))]
9914#[cfg_attr(feature = "ts", ts(export))]
9915pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9916    #[doc = "FW Offset."]
9917    pub offset: u32,
9918    #[doc = "System ID."]
9919    pub target_system: u8,
9920    #[doc = "Component ID."]
9921    pub target_component: u8,
9922}
9923impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9924    pub const ENCODED_LEN: usize = 6usize;
9925    pub const DEFAULT: Self = Self {
9926        offset: 0_u32,
9927        target_system: 0_u8,
9928        target_component: 0_u8,
9929    };
9930    #[cfg(feature = "arbitrary")]
9931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9932        use arbitrary::{Arbitrary, Unstructured};
9933        let mut buf = [0u8; 1024];
9934        rng.fill_bytes(&mut buf);
9935        let mut unstructured = Unstructured::new(&buf);
9936        Self::arbitrary(&mut unstructured).unwrap_or_default()
9937    }
9938}
9939impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9940    fn default() -> Self {
9941        Self::DEFAULT.clone()
9942    }
9943}
9944impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9945    type Message = MavMessage;
9946    const ID: u32 = 50005u32;
9947    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
9948    const EXTRA_CRC: u8 = 152u8;
9949    const ENCODED_LEN: usize = 6usize;
9950    fn deser(
9951        _version: MavlinkVersion,
9952        __input: &[u8],
9953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9954        let avail_len = __input.len();
9955        let mut payload_buf = [0; Self::ENCODED_LEN];
9956        let mut buf = if avail_len < Self::ENCODED_LEN {
9957            payload_buf[0..avail_len].copy_from_slice(__input);
9958            Bytes::new(&payload_buf)
9959        } else {
9960            Bytes::new(__input)
9961        };
9962        let mut __struct = Self::default();
9963        __struct.offset = buf.get_u32_le()?;
9964        __struct.target_system = buf.get_u8()?;
9965        __struct.target_component = buf.get_u8()?;
9966        Ok(__struct)
9967    }
9968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9969        let mut __tmp = BytesMut::new(bytes);
9970        #[allow(clippy::absurd_extreme_comparisons)]
9971        #[allow(unused_comparisons)]
9972        if __tmp.remaining() < Self::ENCODED_LEN {
9973            panic!(
9974                "buffer is too small (need {} bytes, but got {})",
9975                Self::ENCODED_LEN,
9976                __tmp.remaining(),
9977            )
9978        }
9979        __tmp.put_u32_le(self.offset);
9980        __tmp.put_u8(self.target_system);
9981        __tmp.put_u8(self.target_component);
9982        if matches!(version, MavlinkVersion::V2) {
9983            let len = __tmp.len();
9984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9985        } else {
9986            __tmp.len()
9987        }
9988    }
9989}
9990#[doc = "Start firmware update with encapsulated data."]
9991#[doc = ""]
9992#[doc = "ID: 50004"]
9993#[derive(Debug, Clone, PartialEq)]
9994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9996#[cfg_attr(feature = "ts", derive(TS))]
9997#[cfg_attr(feature = "ts", ts(export))]
9998pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9999    #[doc = "FW Size."]
10000    pub size: u32,
10001    #[doc = "FW CRC."]
10002    pub crc: u32,
10003    #[doc = "System ID."]
10004    pub target_system: u8,
10005    #[doc = "Component ID."]
10006    pub target_component: u8,
10007}
10008impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10009    pub const ENCODED_LEN: usize = 10usize;
10010    pub const DEFAULT: Self = Self {
10011        size: 0_u32,
10012        crc: 0_u32,
10013        target_system: 0_u8,
10014        target_component: 0_u8,
10015    };
10016    #[cfg(feature = "arbitrary")]
10017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10018        use arbitrary::{Arbitrary, Unstructured};
10019        let mut buf = [0u8; 1024];
10020        rng.fill_bytes(&mut buf);
10021        let mut unstructured = Unstructured::new(&buf);
10022        Self::arbitrary(&mut unstructured).unwrap_or_default()
10023    }
10024}
10025impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10026    fn default() -> Self {
10027        Self::DEFAULT.clone()
10028    }
10029}
10030impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10031    type Message = MavMessage;
10032    const ID: u32 = 50004u32;
10033    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
10034    const EXTRA_CRC: u8 = 240u8;
10035    const ENCODED_LEN: usize = 10usize;
10036    fn deser(
10037        _version: MavlinkVersion,
10038        __input: &[u8],
10039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10040        let avail_len = __input.len();
10041        let mut payload_buf = [0; Self::ENCODED_LEN];
10042        let mut buf = if avail_len < Self::ENCODED_LEN {
10043            payload_buf[0..avail_len].copy_from_slice(__input);
10044            Bytes::new(&payload_buf)
10045        } else {
10046            Bytes::new(__input)
10047        };
10048        let mut __struct = Self::default();
10049        __struct.size = buf.get_u32_le()?;
10050        __struct.crc = buf.get_u32_le()?;
10051        __struct.target_system = buf.get_u8()?;
10052        __struct.target_component = buf.get_u8()?;
10053        Ok(__struct)
10054    }
10055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10056        let mut __tmp = BytesMut::new(bytes);
10057        #[allow(clippy::absurd_extreme_comparisons)]
10058        #[allow(unused_comparisons)]
10059        if __tmp.remaining() < Self::ENCODED_LEN {
10060            panic!(
10061                "buffer is too small (need {} bytes, but got {})",
10062                Self::ENCODED_LEN,
10063                __tmp.remaining(),
10064            )
10065        }
10066        __tmp.put_u32_le(self.size);
10067        __tmp.put_u32_le(self.crc);
10068        __tmp.put_u8(self.target_system);
10069        __tmp.put_u8(self.target_component);
10070        if matches!(version, MavlinkVersion::V2) {
10071            let len = __tmp.len();
10072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10073        } else {
10074            __tmp.len()
10075        }
10076    }
10077}
10078#[doc = "Raw RC Data."]
10079#[doc = ""]
10080#[doc = "ID: 50001"]
10081#[derive(Debug, Clone, PartialEq)]
10082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10084#[cfg_attr(feature = "ts", derive(TS))]
10085#[cfg_attr(feature = "ts", ts(export))]
10086pub struct CUBEPILOT_RAW_RC_DATA {
10087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10089    pub rc_raw: [u8; 32],
10090}
10091impl CUBEPILOT_RAW_RC_DATA {
10092    pub const ENCODED_LEN: usize = 32usize;
10093    pub const DEFAULT: Self = Self {
10094        rc_raw: [0_u8; 32usize],
10095    };
10096    #[cfg(feature = "arbitrary")]
10097    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10098        use arbitrary::{Arbitrary, Unstructured};
10099        let mut buf = [0u8; 1024];
10100        rng.fill_bytes(&mut buf);
10101        let mut unstructured = Unstructured::new(&buf);
10102        Self::arbitrary(&mut unstructured).unwrap_or_default()
10103    }
10104}
10105impl Default for CUBEPILOT_RAW_RC_DATA {
10106    fn default() -> Self {
10107        Self::DEFAULT.clone()
10108    }
10109}
10110impl MessageData for CUBEPILOT_RAW_RC_DATA {
10111    type Message = MavMessage;
10112    const ID: u32 = 50001u32;
10113    const NAME: &'static str = "CUBEPILOT_RAW_RC";
10114    const EXTRA_CRC: u8 = 246u8;
10115    const ENCODED_LEN: usize = 32usize;
10116    fn deser(
10117        _version: MavlinkVersion,
10118        __input: &[u8],
10119    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10120        let avail_len = __input.len();
10121        let mut payload_buf = [0; Self::ENCODED_LEN];
10122        let mut buf = if avail_len < Self::ENCODED_LEN {
10123            payload_buf[0..avail_len].copy_from_slice(__input);
10124            Bytes::new(&payload_buf)
10125        } else {
10126            Bytes::new(__input)
10127        };
10128        let mut __struct = Self::default();
10129        for v in &mut __struct.rc_raw {
10130            let val = buf.get_u8()?;
10131            *v = val;
10132        }
10133        Ok(__struct)
10134    }
10135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10136        let mut __tmp = BytesMut::new(bytes);
10137        #[allow(clippy::absurd_extreme_comparisons)]
10138        #[allow(unused_comparisons)]
10139        if __tmp.remaining() < Self::ENCODED_LEN {
10140            panic!(
10141                "buffer is too small (need {} bytes, but got {})",
10142                Self::ENCODED_LEN,
10143                __tmp.remaining(),
10144            )
10145        }
10146        for val in &self.rc_raw {
10147            __tmp.put_u8(*val);
10148        }
10149        if matches!(version, MavlinkVersion::V2) {
10150            let len = __tmp.len();
10151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10152        } else {
10153            __tmp.len()
10154        }
10155    }
10156}
10157#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10158#[doc = ""]
10159#[doc = "ID: 411"]
10160#[derive(Debug, Clone, PartialEq)]
10161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10163#[cfg_attr(feature = "ts", derive(TS))]
10164#[cfg_attr(feature = "ts", ts(export))]
10165pub struct CURRENT_EVENT_SEQUENCE_DATA {
10166    #[doc = "Sequence number."]
10167    pub sequence: u16,
10168    #[doc = "Flag bitset."]
10169    pub flags: MavEventCurrentSequenceFlags,
10170}
10171impl CURRENT_EVENT_SEQUENCE_DATA {
10172    pub const ENCODED_LEN: usize = 3usize;
10173    pub const DEFAULT: Self = Self {
10174        sequence: 0_u16,
10175        flags: MavEventCurrentSequenceFlags::DEFAULT,
10176    };
10177    #[cfg(feature = "arbitrary")]
10178    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10179        use arbitrary::{Arbitrary, Unstructured};
10180        let mut buf = [0u8; 1024];
10181        rng.fill_bytes(&mut buf);
10182        let mut unstructured = Unstructured::new(&buf);
10183        Self::arbitrary(&mut unstructured).unwrap_or_default()
10184    }
10185}
10186impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10187    fn default() -> Self {
10188        Self::DEFAULT.clone()
10189    }
10190}
10191impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10192    type Message = MavMessage;
10193    const ID: u32 = 411u32;
10194    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10195    const EXTRA_CRC: u8 = 106u8;
10196    const ENCODED_LEN: usize = 3usize;
10197    fn deser(
10198        _version: MavlinkVersion,
10199        __input: &[u8],
10200    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10201        let avail_len = __input.len();
10202        let mut payload_buf = [0; Self::ENCODED_LEN];
10203        let mut buf = if avail_len < Self::ENCODED_LEN {
10204            payload_buf[0..avail_len].copy_from_slice(__input);
10205            Bytes::new(&payload_buf)
10206        } else {
10207            Bytes::new(__input)
10208        };
10209        let mut __struct = Self::default();
10210        __struct.sequence = buf.get_u16_le()?;
10211        let tmp = buf.get_u8()?;
10212        __struct.flags =
10213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10214                enum_type: "MavEventCurrentSequenceFlags",
10215                value: tmp as u64,
10216            })?;
10217        Ok(__struct)
10218    }
10219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10220        let mut __tmp = BytesMut::new(bytes);
10221        #[allow(clippy::absurd_extreme_comparisons)]
10222        #[allow(unused_comparisons)]
10223        if __tmp.remaining() < Self::ENCODED_LEN {
10224            panic!(
10225                "buffer is too small (need {} bytes, but got {})",
10226                Self::ENCODED_LEN,
10227                __tmp.remaining(),
10228            )
10229        }
10230        __tmp.put_u16_le(self.sequence);
10231        __tmp.put_u8(self.flags as u8);
10232        if matches!(version, MavlinkVersion::V2) {
10233            let len = __tmp.len();
10234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10235        } else {
10236            __tmp.len()
10237        }
10238    }
10239}
10240#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10241#[doc = ""]
10242#[doc = "ID: 436"]
10243#[derive(Debug, Clone, PartialEq)]
10244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10246#[cfg_attr(feature = "ts", derive(TS))]
10247#[cfg_attr(feature = "ts", ts(export))]
10248pub struct CURRENT_MODE_DATA {
10249    #[doc = "A bitfield for use for autopilot-specific flags"]
10250    pub custom_mode: u32,
10251    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10252    pub intended_custom_mode: u32,
10253    #[doc = "Standard mode."]
10254    pub standard_mode: MavStandardMode,
10255}
10256impl CURRENT_MODE_DATA {
10257    pub const ENCODED_LEN: usize = 9usize;
10258    pub const DEFAULT: Self = Self {
10259        custom_mode: 0_u32,
10260        intended_custom_mode: 0_u32,
10261        standard_mode: MavStandardMode::DEFAULT,
10262    };
10263    #[cfg(feature = "arbitrary")]
10264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10265        use arbitrary::{Arbitrary, Unstructured};
10266        let mut buf = [0u8; 1024];
10267        rng.fill_bytes(&mut buf);
10268        let mut unstructured = Unstructured::new(&buf);
10269        Self::arbitrary(&mut unstructured).unwrap_or_default()
10270    }
10271}
10272impl Default for CURRENT_MODE_DATA {
10273    fn default() -> Self {
10274        Self::DEFAULT.clone()
10275    }
10276}
10277impl MessageData for CURRENT_MODE_DATA {
10278    type Message = MavMessage;
10279    const ID: u32 = 436u32;
10280    const NAME: &'static str = "CURRENT_MODE";
10281    const EXTRA_CRC: u8 = 193u8;
10282    const ENCODED_LEN: usize = 9usize;
10283    fn deser(
10284        _version: MavlinkVersion,
10285        __input: &[u8],
10286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10287        let avail_len = __input.len();
10288        let mut payload_buf = [0; Self::ENCODED_LEN];
10289        let mut buf = if avail_len < Self::ENCODED_LEN {
10290            payload_buf[0..avail_len].copy_from_slice(__input);
10291            Bytes::new(&payload_buf)
10292        } else {
10293            Bytes::new(__input)
10294        };
10295        let mut __struct = Self::default();
10296        __struct.custom_mode = buf.get_u32_le()?;
10297        __struct.intended_custom_mode = buf.get_u32_le()?;
10298        let tmp = buf.get_u8()?;
10299        __struct.standard_mode =
10300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10301                enum_type: "MavStandardMode",
10302                value: tmp as u64,
10303            })?;
10304        Ok(__struct)
10305    }
10306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10307        let mut __tmp = BytesMut::new(bytes);
10308        #[allow(clippy::absurd_extreme_comparisons)]
10309        #[allow(unused_comparisons)]
10310        if __tmp.remaining() < Self::ENCODED_LEN {
10311            panic!(
10312                "buffer is too small (need {} bytes, but got {})",
10313                Self::ENCODED_LEN,
10314                __tmp.remaining(),
10315            )
10316        }
10317        __tmp.put_u32_le(self.custom_mode);
10318        __tmp.put_u32_le(self.intended_custom_mode);
10319        __tmp.put_u8(self.standard_mode as u8);
10320        if matches!(version, MavlinkVersion::V2) {
10321            let len = __tmp.len();
10322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10323        } else {
10324            __tmp.len()
10325        }
10326    }
10327}
10328#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10329#[doc = "Data stream status information."]
10330#[doc = ""]
10331#[doc = "ID: 67"]
10332#[derive(Debug, Clone, PartialEq)]
10333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10335#[cfg_attr(feature = "ts", derive(TS))]
10336#[cfg_attr(feature = "ts", ts(export))]
10337pub struct DATA_STREAM_DATA {
10338    #[doc = "The message rate"]
10339    pub message_rate: u16,
10340    #[doc = "The ID of the requested data stream"]
10341    pub stream_id: u8,
10342    #[doc = "1 stream is enabled, 0 stream is stopped."]
10343    pub on_off: u8,
10344}
10345impl DATA_STREAM_DATA {
10346    pub const ENCODED_LEN: usize = 4usize;
10347    pub const DEFAULT: Self = Self {
10348        message_rate: 0_u16,
10349        stream_id: 0_u8,
10350        on_off: 0_u8,
10351    };
10352    #[cfg(feature = "arbitrary")]
10353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10354        use arbitrary::{Arbitrary, Unstructured};
10355        let mut buf = [0u8; 1024];
10356        rng.fill_bytes(&mut buf);
10357        let mut unstructured = Unstructured::new(&buf);
10358        Self::arbitrary(&mut unstructured).unwrap_or_default()
10359    }
10360}
10361impl Default for DATA_STREAM_DATA {
10362    fn default() -> Self {
10363        Self::DEFAULT.clone()
10364    }
10365}
10366impl MessageData for DATA_STREAM_DATA {
10367    type Message = MavMessage;
10368    const ID: u32 = 67u32;
10369    const NAME: &'static str = "DATA_STREAM";
10370    const EXTRA_CRC: u8 = 21u8;
10371    const ENCODED_LEN: usize = 4usize;
10372    fn deser(
10373        _version: MavlinkVersion,
10374        __input: &[u8],
10375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10376        let avail_len = __input.len();
10377        let mut payload_buf = [0; Self::ENCODED_LEN];
10378        let mut buf = if avail_len < Self::ENCODED_LEN {
10379            payload_buf[0..avail_len].copy_from_slice(__input);
10380            Bytes::new(&payload_buf)
10381        } else {
10382            Bytes::new(__input)
10383        };
10384        let mut __struct = Self::default();
10385        __struct.message_rate = buf.get_u16_le()?;
10386        __struct.stream_id = buf.get_u8()?;
10387        __struct.on_off = buf.get_u8()?;
10388        Ok(__struct)
10389    }
10390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10391        let mut __tmp = BytesMut::new(bytes);
10392        #[allow(clippy::absurd_extreme_comparisons)]
10393        #[allow(unused_comparisons)]
10394        if __tmp.remaining() < Self::ENCODED_LEN {
10395            panic!(
10396                "buffer is too small (need {} bytes, but got {})",
10397                Self::ENCODED_LEN,
10398                __tmp.remaining(),
10399            )
10400        }
10401        __tmp.put_u16_le(self.message_rate);
10402        __tmp.put_u8(self.stream_id);
10403        __tmp.put_u8(self.on_off);
10404        if matches!(version, MavlinkVersion::V2) {
10405            let len = __tmp.len();
10406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10407        } else {
10408            __tmp.len()
10409        }
10410    }
10411}
10412#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10413#[doc = ""]
10414#[doc = "ID: 130"]
10415#[derive(Debug, Clone, PartialEq)]
10416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10418#[cfg_attr(feature = "ts", derive(TS))]
10419#[cfg_attr(feature = "ts", ts(export))]
10420pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10421    #[doc = "total data size (set on ACK only)."]
10422    pub size: u32,
10423    #[doc = "Width of a matrix or image."]
10424    pub width: u16,
10425    #[doc = "Height of a matrix or image."]
10426    pub height: u16,
10427    #[doc = "Number of packets being sent (set on ACK only)."]
10428    pub packets: u16,
10429    #[doc = "Type of requested/acknowledged data."]
10430    pub mavtype: MavlinkDataStreamType,
10431    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10432    pub payload: u8,
10433    #[doc = "JPEG quality. Values: [1-100]."]
10434    pub jpg_quality: u8,
10435}
10436impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10437    pub const ENCODED_LEN: usize = 13usize;
10438    pub const DEFAULT: Self = Self {
10439        size: 0_u32,
10440        width: 0_u16,
10441        height: 0_u16,
10442        packets: 0_u16,
10443        mavtype: MavlinkDataStreamType::DEFAULT,
10444        payload: 0_u8,
10445        jpg_quality: 0_u8,
10446    };
10447    #[cfg(feature = "arbitrary")]
10448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10449        use arbitrary::{Arbitrary, Unstructured};
10450        let mut buf = [0u8; 1024];
10451        rng.fill_bytes(&mut buf);
10452        let mut unstructured = Unstructured::new(&buf);
10453        Self::arbitrary(&mut unstructured).unwrap_or_default()
10454    }
10455}
10456impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10457    fn default() -> Self {
10458        Self::DEFAULT.clone()
10459    }
10460}
10461impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10462    type Message = MavMessage;
10463    const ID: u32 = 130u32;
10464    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10465    const EXTRA_CRC: u8 = 29u8;
10466    const ENCODED_LEN: usize = 13usize;
10467    fn deser(
10468        _version: MavlinkVersion,
10469        __input: &[u8],
10470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10471        let avail_len = __input.len();
10472        let mut payload_buf = [0; Self::ENCODED_LEN];
10473        let mut buf = if avail_len < Self::ENCODED_LEN {
10474            payload_buf[0..avail_len].copy_from_slice(__input);
10475            Bytes::new(&payload_buf)
10476        } else {
10477            Bytes::new(__input)
10478        };
10479        let mut __struct = Self::default();
10480        __struct.size = buf.get_u32_le()?;
10481        __struct.width = buf.get_u16_le()?;
10482        __struct.height = buf.get_u16_le()?;
10483        __struct.packets = buf.get_u16_le()?;
10484        let tmp = buf.get_u8()?;
10485        __struct.mavtype =
10486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10487                enum_type: "MavlinkDataStreamType",
10488                value: tmp as u64,
10489            })?;
10490        __struct.payload = buf.get_u8()?;
10491        __struct.jpg_quality = buf.get_u8()?;
10492        Ok(__struct)
10493    }
10494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10495        let mut __tmp = BytesMut::new(bytes);
10496        #[allow(clippy::absurd_extreme_comparisons)]
10497        #[allow(unused_comparisons)]
10498        if __tmp.remaining() < Self::ENCODED_LEN {
10499            panic!(
10500                "buffer is too small (need {} bytes, but got {})",
10501                Self::ENCODED_LEN,
10502                __tmp.remaining(),
10503            )
10504        }
10505        __tmp.put_u32_le(self.size);
10506        __tmp.put_u16_le(self.width);
10507        __tmp.put_u16_le(self.height);
10508        __tmp.put_u16_le(self.packets);
10509        __tmp.put_u8(self.mavtype as u8);
10510        __tmp.put_u8(self.payload);
10511        __tmp.put_u8(self.jpg_quality);
10512        if matches!(version, MavlinkVersion::V2) {
10513            let len = __tmp.len();
10514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10515        } else {
10516            __tmp.len()
10517        }
10518    }
10519}
10520#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10521#[doc = ""]
10522#[doc = "ID: 254"]
10523#[derive(Debug, Clone, PartialEq)]
10524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10526#[cfg_attr(feature = "ts", derive(TS))]
10527#[cfg_attr(feature = "ts", ts(export))]
10528pub struct DEBUG_DATA {
10529    #[doc = "Timestamp (time since system boot)."]
10530    pub time_boot_ms: u32,
10531    #[doc = "DEBUG value"]
10532    pub value: f32,
10533    #[doc = "index of debug variable"]
10534    pub ind: u8,
10535}
10536impl DEBUG_DATA {
10537    pub const ENCODED_LEN: usize = 9usize;
10538    pub const DEFAULT: Self = Self {
10539        time_boot_ms: 0_u32,
10540        value: 0.0_f32,
10541        ind: 0_u8,
10542    };
10543    #[cfg(feature = "arbitrary")]
10544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10545        use arbitrary::{Arbitrary, Unstructured};
10546        let mut buf = [0u8; 1024];
10547        rng.fill_bytes(&mut buf);
10548        let mut unstructured = Unstructured::new(&buf);
10549        Self::arbitrary(&mut unstructured).unwrap_or_default()
10550    }
10551}
10552impl Default for DEBUG_DATA {
10553    fn default() -> Self {
10554        Self::DEFAULT.clone()
10555    }
10556}
10557impl MessageData for DEBUG_DATA {
10558    type Message = MavMessage;
10559    const ID: u32 = 254u32;
10560    const NAME: &'static str = "DEBUG";
10561    const EXTRA_CRC: u8 = 46u8;
10562    const ENCODED_LEN: usize = 9usize;
10563    fn deser(
10564        _version: MavlinkVersion,
10565        __input: &[u8],
10566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10567        let avail_len = __input.len();
10568        let mut payload_buf = [0; Self::ENCODED_LEN];
10569        let mut buf = if avail_len < Self::ENCODED_LEN {
10570            payload_buf[0..avail_len].copy_from_slice(__input);
10571            Bytes::new(&payload_buf)
10572        } else {
10573            Bytes::new(__input)
10574        };
10575        let mut __struct = Self::default();
10576        __struct.time_boot_ms = buf.get_u32_le()?;
10577        __struct.value = buf.get_f32_le()?;
10578        __struct.ind = buf.get_u8()?;
10579        Ok(__struct)
10580    }
10581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10582        let mut __tmp = BytesMut::new(bytes);
10583        #[allow(clippy::absurd_extreme_comparisons)]
10584        #[allow(unused_comparisons)]
10585        if __tmp.remaining() < Self::ENCODED_LEN {
10586            panic!(
10587                "buffer is too small (need {} bytes, but got {})",
10588                Self::ENCODED_LEN,
10589                __tmp.remaining(),
10590            )
10591        }
10592        __tmp.put_u32_le(self.time_boot_ms);
10593        __tmp.put_f32_le(self.value);
10594        __tmp.put_u8(self.ind);
10595        if matches!(version, MavlinkVersion::V2) {
10596            let len = __tmp.len();
10597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10598        } else {
10599            __tmp.len()
10600        }
10601    }
10602}
10603#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10604#[doc = ""]
10605#[doc = "ID: 350"]
10606#[derive(Debug, Clone, PartialEq)]
10607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10609#[cfg_attr(feature = "ts", derive(TS))]
10610#[cfg_attr(feature = "ts", ts(export))]
10611pub struct DEBUG_FLOAT_ARRAY_DATA {
10612    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10613    pub time_usec: u64,
10614    #[doc = "Unique ID used to discriminate between arrays"]
10615    pub array_id: u16,
10616    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10617    #[cfg_attr(feature = "ts", ts(type = "string"))]
10618    pub name: CharArray<10>,
10619    #[doc = "data"]
10620    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10623    pub data: [f32; 58],
10624}
10625impl DEBUG_FLOAT_ARRAY_DATA {
10626    pub const ENCODED_LEN: usize = 252usize;
10627    pub const DEFAULT: Self = Self {
10628        time_usec: 0_u64,
10629        array_id: 0_u16,
10630        name: CharArray::new([0_u8; 10usize]),
10631        data: [0.0_f32; 58usize],
10632    };
10633    #[cfg(feature = "arbitrary")]
10634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10635        use arbitrary::{Arbitrary, Unstructured};
10636        let mut buf = [0u8; 1024];
10637        rng.fill_bytes(&mut buf);
10638        let mut unstructured = Unstructured::new(&buf);
10639        Self::arbitrary(&mut unstructured).unwrap_or_default()
10640    }
10641}
10642impl Default for DEBUG_FLOAT_ARRAY_DATA {
10643    fn default() -> Self {
10644        Self::DEFAULT.clone()
10645    }
10646}
10647impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10648    type Message = MavMessage;
10649    const ID: u32 = 350u32;
10650    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10651    const EXTRA_CRC: u8 = 232u8;
10652    const ENCODED_LEN: usize = 252usize;
10653    fn deser(
10654        _version: MavlinkVersion,
10655        __input: &[u8],
10656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10657        let avail_len = __input.len();
10658        let mut payload_buf = [0; Self::ENCODED_LEN];
10659        let mut buf = if avail_len < Self::ENCODED_LEN {
10660            payload_buf[0..avail_len].copy_from_slice(__input);
10661            Bytes::new(&payload_buf)
10662        } else {
10663            Bytes::new(__input)
10664        };
10665        let mut __struct = Self::default();
10666        __struct.time_usec = buf.get_u64_le()?;
10667        __struct.array_id = buf.get_u16_le()?;
10668        let mut tmp = [0_u8; 10usize];
10669        for v in &mut tmp {
10670            *v = buf.get_u8()?;
10671        }
10672        __struct.name = CharArray::new(tmp);
10673        for v in &mut __struct.data {
10674            let val = buf.get_f32_le()?;
10675            *v = val;
10676        }
10677        Ok(__struct)
10678    }
10679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10680        let mut __tmp = BytesMut::new(bytes);
10681        #[allow(clippy::absurd_extreme_comparisons)]
10682        #[allow(unused_comparisons)]
10683        if __tmp.remaining() < Self::ENCODED_LEN {
10684            panic!(
10685                "buffer is too small (need {} bytes, but got {})",
10686                Self::ENCODED_LEN,
10687                __tmp.remaining(),
10688            )
10689        }
10690        __tmp.put_u64_le(self.time_usec);
10691        __tmp.put_u16_le(self.array_id);
10692        for val in &self.name {
10693            __tmp.put_u8(*val);
10694        }
10695        if matches!(version, MavlinkVersion::V2) {
10696            for val in &self.data {
10697                __tmp.put_f32_le(*val);
10698            }
10699            let len = __tmp.len();
10700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10701        } else {
10702            __tmp.len()
10703        }
10704    }
10705}
10706#[doc = "To debug something using a named 3D vector."]
10707#[doc = ""]
10708#[doc = "ID: 250"]
10709#[derive(Debug, Clone, PartialEq)]
10710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10712#[cfg_attr(feature = "ts", derive(TS))]
10713#[cfg_attr(feature = "ts", ts(export))]
10714pub struct DEBUG_VECT_DATA {
10715    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10716    pub time_usec: u64,
10717    #[doc = "x"]
10718    pub x: f32,
10719    #[doc = "y"]
10720    pub y: f32,
10721    #[doc = "z"]
10722    pub z: f32,
10723    #[doc = "Name"]
10724    #[cfg_attr(feature = "ts", ts(type = "string"))]
10725    pub name: CharArray<10>,
10726}
10727impl DEBUG_VECT_DATA {
10728    pub const ENCODED_LEN: usize = 30usize;
10729    pub const DEFAULT: Self = Self {
10730        time_usec: 0_u64,
10731        x: 0.0_f32,
10732        y: 0.0_f32,
10733        z: 0.0_f32,
10734        name: CharArray::new([0_u8; 10usize]),
10735    };
10736    #[cfg(feature = "arbitrary")]
10737    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10738        use arbitrary::{Arbitrary, Unstructured};
10739        let mut buf = [0u8; 1024];
10740        rng.fill_bytes(&mut buf);
10741        let mut unstructured = Unstructured::new(&buf);
10742        Self::arbitrary(&mut unstructured).unwrap_or_default()
10743    }
10744}
10745impl Default for DEBUG_VECT_DATA {
10746    fn default() -> Self {
10747        Self::DEFAULT.clone()
10748    }
10749}
10750impl MessageData for DEBUG_VECT_DATA {
10751    type Message = MavMessage;
10752    const ID: u32 = 250u32;
10753    const NAME: &'static str = "DEBUG_VECT";
10754    const EXTRA_CRC: u8 = 49u8;
10755    const ENCODED_LEN: usize = 30usize;
10756    fn deser(
10757        _version: MavlinkVersion,
10758        __input: &[u8],
10759    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10760        let avail_len = __input.len();
10761        let mut payload_buf = [0; Self::ENCODED_LEN];
10762        let mut buf = if avail_len < Self::ENCODED_LEN {
10763            payload_buf[0..avail_len].copy_from_slice(__input);
10764            Bytes::new(&payload_buf)
10765        } else {
10766            Bytes::new(__input)
10767        };
10768        let mut __struct = Self::default();
10769        __struct.time_usec = buf.get_u64_le()?;
10770        __struct.x = buf.get_f32_le()?;
10771        __struct.y = buf.get_f32_le()?;
10772        __struct.z = buf.get_f32_le()?;
10773        let mut tmp = [0_u8; 10usize];
10774        for v in &mut tmp {
10775            *v = buf.get_u8()?;
10776        }
10777        __struct.name = CharArray::new(tmp);
10778        Ok(__struct)
10779    }
10780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10781        let mut __tmp = BytesMut::new(bytes);
10782        #[allow(clippy::absurd_extreme_comparisons)]
10783        #[allow(unused_comparisons)]
10784        if __tmp.remaining() < Self::ENCODED_LEN {
10785            panic!(
10786                "buffer is too small (need {} bytes, but got {})",
10787                Self::ENCODED_LEN,
10788                __tmp.remaining(),
10789            )
10790        }
10791        __tmp.put_u64_le(self.time_usec);
10792        __tmp.put_f32_le(self.x);
10793        __tmp.put_f32_le(self.y);
10794        __tmp.put_f32_le(self.z);
10795        for val in &self.name {
10796            __tmp.put_u8(*val);
10797        }
10798        if matches!(version, MavlinkVersion::V2) {
10799            let len = __tmp.len();
10800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10801        } else {
10802            __tmp.len()
10803        }
10804    }
10805}
10806#[doc = "Distance sensor information for an onboard rangefinder."]
10807#[doc = ""]
10808#[doc = "ID: 132"]
10809#[derive(Debug, Clone, PartialEq)]
10810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10812#[cfg_attr(feature = "ts", derive(TS))]
10813#[cfg_attr(feature = "ts", ts(export))]
10814pub struct DISTANCE_SENSOR_DATA {
10815    #[doc = "Timestamp (time since system boot)."]
10816    pub time_boot_ms: u32,
10817    #[doc = "Minimum distance the sensor can measure"]
10818    pub min_distance: u16,
10819    #[doc = "Maximum distance the sensor can measure"]
10820    pub max_distance: u16,
10821    #[doc = "Current distance reading"]
10822    pub current_distance: u16,
10823    #[doc = "Type of distance sensor."]
10824    pub mavtype: MavDistanceSensor,
10825    #[doc = "Onboard ID of the sensor"]
10826    pub id: u8,
10827    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10828    pub orientation: MavSensorOrientation,
10829    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10830    pub covariance: u8,
10831    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10833    pub horizontal_fov: f32,
10834    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10836    pub vertical_fov: f32,
10837    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10841    pub quaternion: [f32; 4],
10842    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10843    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10844    pub signal_quality: u8,
10845}
10846impl DISTANCE_SENSOR_DATA {
10847    pub const ENCODED_LEN: usize = 39usize;
10848    pub const DEFAULT: Self = Self {
10849        time_boot_ms: 0_u32,
10850        min_distance: 0_u16,
10851        max_distance: 0_u16,
10852        current_distance: 0_u16,
10853        mavtype: MavDistanceSensor::DEFAULT,
10854        id: 0_u8,
10855        orientation: MavSensorOrientation::DEFAULT,
10856        covariance: 0_u8,
10857        horizontal_fov: 0.0_f32,
10858        vertical_fov: 0.0_f32,
10859        quaternion: [0.0_f32; 4usize],
10860        signal_quality: 0_u8,
10861    };
10862    #[cfg(feature = "arbitrary")]
10863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10864        use arbitrary::{Arbitrary, Unstructured};
10865        let mut buf = [0u8; 1024];
10866        rng.fill_bytes(&mut buf);
10867        let mut unstructured = Unstructured::new(&buf);
10868        Self::arbitrary(&mut unstructured).unwrap_or_default()
10869    }
10870}
10871impl Default for DISTANCE_SENSOR_DATA {
10872    fn default() -> Self {
10873        Self::DEFAULT.clone()
10874    }
10875}
10876impl MessageData for DISTANCE_SENSOR_DATA {
10877    type Message = MavMessage;
10878    const ID: u32 = 132u32;
10879    const NAME: &'static str = "DISTANCE_SENSOR";
10880    const EXTRA_CRC: u8 = 85u8;
10881    const ENCODED_LEN: usize = 39usize;
10882    fn deser(
10883        _version: MavlinkVersion,
10884        __input: &[u8],
10885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10886        let avail_len = __input.len();
10887        let mut payload_buf = [0; Self::ENCODED_LEN];
10888        let mut buf = if avail_len < Self::ENCODED_LEN {
10889            payload_buf[0..avail_len].copy_from_slice(__input);
10890            Bytes::new(&payload_buf)
10891        } else {
10892            Bytes::new(__input)
10893        };
10894        let mut __struct = Self::default();
10895        __struct.time_boot_ms = buf.get_u32_le()?;
10896        __struct.min_distance = buf.get_u16_le()?;
10897        __struct.max_distance = buf.get_u16_le()?;
10898        __struct.current_distance = buf.get_u16_le()?;
10899        let tmp = buf.get_u8()?;
10900        __struct.mavtype =
10901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10902                enum_type: "MavDistanceSensor",
10903                value: tmp as u64,
10904            })?;
10905        __struct.id = buf.get_u8()?;
10906        let tmp = buf.get_u8()?;
10907        __struct.orientation =
10908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10909                enum_type: "MavSensorOrientation",
10910                value: tmp as u64,
10911            })?;
10912        __struct.covariance = buf.get_u8()?;
10913        __struct.horizontal_fov = buf.get_f32_le()?;
10914        __struct.vertical_fov = buf.get_f32_le()?;
10915        for v in &mut __struct.quaternion {
10916            let val = buf.get_f32_le()?;
10917            *v = val;
10918        }
10919        __struct.signal_quality = buf.get_u8()?;
10920        Ok(__struct)
10921    }
10922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10923        let mut __tmp = BytesMut::new(bytes);
10924        #[allow(clippy::absurd_extreme_comparisons)]
10925        #[allow(unused_comparisons)]
10926        if __tmp.remaining() < Self::ENCODED_LEN {
10927            panic!(
10928                "buffer is too small (need {} bytes, but got {})",
10929                Self::ENCODED_LEN,
10930                __tmp.remaining(),
10931            )
10932        }
10933        __tmp.put_u32_le(self.time_boot_ms);
10934        __tmp.put_u16_le(self.min_distance);
10935        __tmp.put_u16_le(self.max_distance);
10936        __tmp.put_u16_le(self.current_distance);
10937        __tmp.put_u8(self.mavtype as u8);
10938        __tmp.put_u8(self.id);
10939        __tmp.put_u8(self.orientation as u8);
10940        __tmp.put_u8(self.covariance);
10941        if matches!(version, MavlinkVersion::V2) {
10942            __tmp.put_f32_le(self.horizontal_fov);
10943            __tmp.put_f32_le(self.vertical_fov);
10944            for val in &self.quaternion {
10945                __tmp.put_f32_le(*val);
10946            }
10947            __tmp.put_u8(self.signal_quality);
10948            let len = __tmp.len();
10949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10950        } else {
10951            __tmp.len()
10952        }
10953    }
10954}
10955#[doc = "EFI status output."]
10956#[doc = ""]
10957#[doc = "ID: 225"]
10958#[derive(Debug, Clone, PartialEq)]
10959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10961#[cfg_attr(feature = "ts", derive(TS))]
10962#[cfg_attr(feature = "ts", ts(export))]
10963pub struct EFI_STATUS_DATA {
10964    #[doc = "ECU index"]
10965    pub ecu_index: f32,
10966    #[doc = "RPM"]
10967    pub rpm: f32,
10968    #[doc = "Fuel consumed"]
10969    pub fuel_consumed: f32,
10970    #[doc = "Fuel flow rate"]
10971    pub fuel_flow: f32,
10972    #[doc = "Engine load"]
10973    pub engine_load: f32,
10974    #[doc = "Throttle position"]
10975    pub throttle_position: f32,
10976    #[doc = "Spark dwell time"]
10977    pub spark_dwell_time: f32,
10978    #[doc = "Barometric pressure"]
10979    pub barometric_pressure: f32,
10980    #[doc = "Intake manifold pressure("]
10981    pub intake_manifold_pressure: f32,
10982    #[doc = "Intake manifold temperature"]
10983    pub intake_manifold_temperature: f32,
10984    #[doc = "Cylinder head temperature"]
10985    pub cylinder_head_temperature: f32,
10986    #[doc = "Ignition timing (Crank angle degrees)"]
10987    pub ignition_timing: f32,
10988    #[doc = "Injection time"]
10989    pub injection_time: f32,
10990    #[doc = "Exhaust gas temperature"]
10991    pub exhaust_gas_temperature: f32,
10992    #[doc = "Output throttle"]
10993    pub throttle_out: f32,
10994    #[doc = "Pressure/temperature compensation"]
10995    pub pt_compensation: f32,
10996    #[doc = "EFI health status"]
10997    pub health: u8,
10998    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10999    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11000    pub ignition_voltage: f32,
11001    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11003    pub fuel_pressure: f32,
11004}
11005impl EFI_STATUS_DATA {
11006    pub const ENCODED_LEN: usize = 73usize;
11007    pub const DEFAULT: Self = Self {
11008        ecu_index: 0.0_f32,
11009        rpm: 0.0_f32,
11010        fuel_consumed: 0.0_f32,
11011        fuel_flow: 0.0_f32,
11012        engine_load: 0.0_f32,
11013        throttle_position: 0.0_f32,
11014        spark_dwell_time: 0.0_f32,
11015        barometric_pressure: 0.0_f32,
11016        intake_manifold_pressure: 0.0_f32,
11017        intake_manifold_temperature: 0.0_f32,
11018        cylinder_head_temperature: 0.0_f32,
11019        ignition_timing: 0.0_f32,
11020        injection_time: 0.0_f32,
11021        exhaust_gas_temperature: 0.0_f32,
11022        throttle_out: 0.0_f32,
11023        pt_compensation: 0.0_f32,
11024        health: 0_u8,
11025        ignition_voltage: 0.0_f32,
11026        fuel_pressure: 0.0_f32,
11027    };
11028    #[cfg(feature = "arbitrary")]
11029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11030        use arbitrary::{Arbitrary, Unstructured};
11031        let mut buf = [0u8; 1024];
11032        rng.fill_bytes(&mut buf);
11033        let mut unstructured = Unstructured::new(&buf);
11034        Self::arbitrary(&mut unstructured).unwrap_or_default()
11035    }
11036}
11037impl Default for EFI_STATUS_DATA {
11038    fn default() -> Self {
11039        Self::DEFAULT.clone()
11040    }
11041}
11042impl MessageData for EFI_STATUS_DATA {
11043    type Message = MavMessage;
11044    const ID: u32 = 225u32;
11045    const NAME: &'static str = "EFI_STATUS";
11046    const EXTRA_CRC: u8 = 208u8;
11047    const ENCODED_LEN: usize = 73usize;
11048    fn deser(
11049        _version: MavlinkVersion,
11050        __input: &[u8],
11051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11052        let avail_len = __input.len();
11053        let mut payload_buf = [0; Self::ENCODED_LEN];
11054        let mut buf = if avail_len < Self::ENCODED_LEN {
11055            payload_buf[0..avail_len].copy_from_slice(__input);
11056            Bytes::new(&payload_buf)
11057        } else {
11058            Bytes::new(__input)
11059        };
11060        let mut __struct = Self::default();
11061        __struct.ecu_index = buf.get_f32_le()?;
11062        __struct.rpm = buf.get_f32_le()?;
11063        __struct.fuel_consumed = buf.get_f32_le()?;
11064        __struct.fuel_flow = buf.get_f32_le()?;
11065        __struct.engine_load = buf.get_f32_le()?;
11066        __struct.throttle_position = buf.get_f32_le()?;
11067        __struct.spark_dwell_time = buf.get_f32_le()?;
11068        __struct.barometric_pressure = buf.get_f32_le()?;
11069        __struct.intake_manifold_pressure = buf.get_f32_le()?;
11070        __struct.intake_manifold_temperature = buf.get_f32_le()?;
11071        __struct.cylinder_head_temperature = buf.get_f32_le()?;
11072        __struct.ignition_timing = buf.get_f32_le()?;
11073        __struct.injection_time = buf.get_f32_le()?;
11074        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
11075        __struct.throttle_out = buf.get_f32_le()?;
11076        __struct.pt_compensation = buf.get_f32_le()?;
11077        __struct.health = buf.get_u8()?;
11078        __struct.ignition_voltage = buf.get_f32_le()?;
11079        __struct.fuel_pressure = buf.get_f32_le()?;
11080        Ok(__struct)
11081    }
11082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11083        let mut __tmp = BytesMut::new(bytes);
11084        #[allow(clippy::absurd_extreme_comparisons)]
11085        #[allow(unused_comparisons)]
11086        if __tmp.remaining() < Self::ENCODED_LEN {
11087            panic!(
11088                "buffer is too small (need {} bytes, but got {})",
11089                Self::ENCODED_LEN,
11090                __tmp.remaining(),
11091            )
11092        }
11093        __tmp.put_f32_le(self.ecu_index);
11094        __tmp.put_f32_le(self.rpm);
11095        __tmp.put_f32_le(self.fuel_consumed);
11096        __tmp.put_f32_le(self.fuel_flow);
11097        __tmp.put_f32_le(self.engine_load);
11098        __tmp.put_f32_le(self.throttle_position);
11099        __tmp.put_f32_le(self.spark_dwell_time);
11100        __tmp.put_f32_le(self.barometric_pressure);
11101        __tmp.put_f32_le(self.intake_manifold_pressure);
11102        __tmp.put_f32_le(self.intake_manifold_temperature);
11103        __tmp.put_f32_le(self.cylinder_head_temperature);
11104        __tmp.put_f32_le(self.ignition_timing);
11105        __tmp.put_f32_le(self.injection_time);
11106        __tmp.put_f32_le(self.exhaust_gas_temperature);
11107        __tmp.put_f32_le(self.throttle_out);
11108        __tmp.put_f32_le(self.pt_compensation);
11109        __tmp.put_u8(self.health);
11110        if matches!(version, MavlinkVersion::V2) {
11111            __tmp.put_f32_le(self.ignition_voltage);
11112            __tmp.put_f32_le(self.fuel_pressure);
11113            let len = __tmp.len();
11114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11115        } else {
11116            __tmp.len()
11117        }
11118    }
11119}
11120#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11121#[doc = ""]
11122#[doc = "ID: 131"]
11123#[derive(Debug, Clone, PartialEq)]
11124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11126#[cfg_attr(feature = "ts", derive(TS))]
11127#[cfg_attr(feature = "ts", ts(export))]
11128pub struct ENCAPSULATED_DATA_DATA {
11129    #[doc = "sequence number (starting with 0 on every transmission)"]
11130    pub seqnr: u16,
11131    #[doc = "image data bytes"]
11132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11133    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11134    pub data: [u8; 253],
11135}
11136impl ENCAPSULATED_DATA_DATA {
11137    pub const ENCODED_LEN: usize = 255usize;
11138    pub const DEFAULT: Self = Self {
11139        seqnr: 0_u16,
11140        data: [0_u8; 253usize],
11141    };
11142    #[cfg(feature = "arbitrary")]
11143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11144        use arbitrary::{Arbitrary, Unstructured};
11145        let mut buf = [0u8; 1024];
11146        rng.fill_bytes(&mut buf);
11147        let mut unstructured = Unstructured::new(&buf);
11148        Self::arbitrary(&mut unstructured).unwrap_or_default()
11149    }
11150}
11151impl Default for ENCAPSULATED_DATA_DATA {
11152    fn default() -> Self {
11153        Self::DEFAULT.clone()
11154    }
11155}
11156impl MessageData for ENCAPSULATED_DATA_DATA {
11157    type Message = MavMessage;
11158    const ID: u32 = 131u32;
11159    const NAME: &'static str = "ENCAPSULATED_DATA";
11160    const EXTRA_CRC: u8 = 223u8;
11161    const ENCODED_LEN: usize = 255usize;
11162    fn deser(
11163        _version: MavlinkVersion,
11164        __input: &[u8],
11165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11166        let avail_len = __input.len();
11167        let mut payload_buf = [0; Self::ENCODED_LEN];
11168        let mut buf = if avail_len < Self::ENCODED_LEN {
11169            payload_buf[0..avail_len].copy_from_slice(__input);
11170            Bytes::new(&payload_buf)
11171        } else {
11172            Bytes::new(__input)
11173        };
11174        let mut __struct = Self::default();
11175        __struct.seqnr = buf.get_u16_le()?;
11176        for v in &mut __struct.data {
11177            let val = buf.get_u8()?;
11178            *v = val;
11179        }
11180        Ok(__struct)
11181    }
11182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11183        let mut __tmp = BytesMut::new(bytes);
11184        #[allow(clippy::absurd_extreme_comparisons)]
11185        #[allow(unused_comparisons)]
11186        if __tmp.remaining() < Self::ENCODED_LEN {
11187            panic!(
11188                "buffer is too small (need {} bytes, but got {})",
11189                Self::ENCODED_LEN,
11190                __tmp.remaining(),
11191            )
11192        }
11193        __tmp.put_u16_le(self.seqnr);
11194        for val in &self.data {
11195            __tmp.put_u8(*val);
11196        }
11197        if matches!(version, MavlinkVersion::V2) {
11198            let len = __tmp.len();
11199            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11200        } else {
11201            __tmp.len()
11202        }
11203    }
11204}
11205#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11206#[doc = ""]
11207#[doc = "ID: 290"]
11208#[derive(Debug, Clone, PartialEq)]
11209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11211#[cfg_attr(feature = "ts", derive(TS))]
11212#[cfg_attr(feature = "ts", ts(export))]
11213pub struct ESC_INFO_DATA {
11214    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11215    pub time_usec: u64,
11216    #[doc = "Number of reported errors by each ESC since boot."]
11217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11218    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11219    pub error_count: [u32; 4],
11220    #[doc = "Counter of data packets received."]
11221    pub counter: u16,
11222    #[doc = "Bitmap of ESC failure flags."]
11223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11225    pub failure_flags: [u16; 4],
11226    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11228    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11229    pub temperature: [i16; 4],
11230    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11231    pub index: u8,
11232    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11233    pub count: u8,
11234    #[doc = "Connection type protocol for all ESC."]
11235    pub connection_type: EscConnectionType,
11236    #[doc = "Information regarding online/offline status of each ESC."]
11237    pub info: u8,
11238}
11239impl ESC_INFO_DATA {
11240    pub const ENCODED_LEN: usize = 46usize;
11241    pub const DEFAULT: Self = Self {
11242        time_usec: 0_u64,
11243        error_count: [0_u32; 4usize],
11244        counter: 0_u16,
11245        failure_flags: [0_u16; 4usize],
11246        temperature: [0_i16; 4usize],
11247        index: 0_u8,
11248        count: 0_u8,
11249        connection_type: EscConnectionType::DEFAULT,
11250        info: 0_u8,
11251    };
11252    #[cfg(feature = "arbitrary")]
11253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11254        use arbitrary::{Arbitrary, Unstructured};
11255        let mut buf = [0u8; 1024];
11256        rng.fill_bytes(&mut buf);
11257        let mut unstructured = Unstructured::new(&buf);
11258        Self::arbitrary(&mut unstructured).unwrap_or_default()
11259    }
11260}
11261impl Default for ESC_INFO_DATA {
11262    fn default() -> Self {
11263        Self::DEFAULT.clone()
11264    }
11265}
11266impl MessageData for ESC_INFO_DATA {
11267    type Message = MavMessage;
11268    const ID: u32 = 290u32;
11269    const NAME: &'static str = "ESC_INFO";
11270    const EXTRA_CRC: u8 = 251u8;
11271    const ENCODED_LEN: usize = 46usize;
11272    fn deser(
11273        _version: MavlinkVersion,
11274        __input: &[u8],
11275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11276        let avail_len = __input.len();
11277        let mut payload_buf = [0; Self::ENCODED_LEN];
11278        let mut buf = if avail_len < Self::ENCODED_LEN {
11279            payload_buf[0..avail_len].copy_from_slice(__input);
11280            Bytes::new(&payload_buf)
11281        } else {
11282            Bytes::new(__input)
11283        };
11284        let mut __struct = Self::default();
11285        __struct.time_usec = buf.get_u64_le()?;
11286        for v in &mut __struct.error_count {
11287            let val = buf.get_u32_le()?;
11288            *v = val;
11289        }
11290        __struct.counter = buf.get_u16_le()?;
11291        for v in &mut __struct.failure_flags {
11292            let val = buf.get_u16_le()?;
11293            *v = val;
11294        }
11295        for v in &mut __struct.temperature {
11296            let val = buf.get_i16_le()?;
11297            *v = val;
11298        }
11299        __struct.index = buf.get_u8()?;
11300        __struct.count = buf.get_u8()?;
11301        let tmp = buf.get_u8()?;
11302        __struct.connection_type =
11303            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11304                enum_type: "EscConnectionType",
11305                value: tmp as u64,
11306            })?;
11307        __struct.info = buf.get_u8()?;
11308        Ok(__struct)
11309    }
11310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11311        let mut __tmp = BytesMut::new(bytes);
11312        #[allow(clippy::absurd_extreme_comparisons)]
11313        #[allow(unused_comparisons)]
11314        if __tmp.remaining() < Self::ENCODED_LEN {
11315            panic!(
11316                "buffer is too small (need {} bytes, but got {})",
11317                Self::ENCODED_LEN,
11318                __tmp.remaining(),
11319            )
11320        }
11321        __tmp.put_u64_le(self.time_usec);
11322        for val in &self.error_count {
11323            __tmp.put_u32_le(*val);
11324        }
11325        __tmp.put_u16_le(self.counter);
11326        for val in &self.failure_flags {
11327            __tmp.put_u16_le(*val);
11328        }
11329        for val in &self.temperature {
11330            __tmp.put_i16_le(*val);
11331        }
11332        __tmp.put_u8(self.index);
11333        __tmp.put_u8(self.count);
11334        __tmp.put_u8(self.connection_type as u8);
11335        __tmp.put_u8(self.info);
11336        if matches!(version, MavlinkVersion::V2) {
11337            let len = __tmp.len();
11338            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11339        } else {
11340            __tmp.len()
11341        }
11342    }
11343}
11344#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11345#[doc = ""]
11346#[doc = "ID: 291"]
11347#[derive(Debug, Clone, PartialEq)]
11348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11350#[cfg_attr(feature = "ts", derive(TS))]
11351#[cfg_attr(feature = "ts", ts(export))]
11352pub struct ESC_STATUS_DATA {
11353    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11354    pub time_usec: u64,
11355    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11357    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11358    pub rpm: [i32; 4],
11359    #[doc = "Voltage measured from each ESC."]
11360    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11361    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11362    pub voltage: [f32; 4],
11363    #[doc = "Current measured from each ESC."]
11364    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11365    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11366    pub current: [f32; 4],
11367    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11368    pub index: u8,
11369}
11370impl ESC_STATUS_DATA {
11371    pub const ENCODED_LEN: usize = 57usize;
11372    pub const DEFAULT: Self = Self {
11373        time_usec: 0_u64,
11374        rpm: [0_i32; 4usize],
11375        voltage: [0.0_f32; 4usize],
11376        current: [0.0_f32; 4usize],
11377        index: 0_u8,
11378    };
11379    #[cfg(feature = "arbitrary")]
11380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11381        use arbitrary::{Arbitrary, Unstructured};
11382        let mut buf = [0u8; 1024];
11383        rng.fill_bytes(&mut buf);
11384        let mut unstructured = Unstructured::new(&buf);
11385        Self::arbitrary(&mut unstructured).unwrap_or_default()
11386    }
11387}
11388impl Default for ESC_STATUS_DATA {
11389    fn default() -> Self {
11390        Self::DEFAULT.clone()
11391    }
11392}
11393impl MessageData for ESC_STATUS_DATA {
11394    type Message = MavMessage;
11395    const ID: u32 = 291u32;
11396    const NAME: &'static str = "ESC_STATUS";
11397    const EXTRA_CRC: u8 = 10u8;
11398    const ENCODED_LEN: usize = 57usize;
11399    fn deser(
11400        _version: MavlinkVersion,
11401        __input: &[u8],
11402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11403        let avail_len = __input.len();
11404        let mut payload_buf = [0; Self::ENCODED_LEN];
11405        let mut buf = if avail_len < Self::ENCODED_LEN {
11406            payload_buf[0..avail_len].copy_from_slice(__input);
11407            Bytes::new(&payload_buf)
11408        } else {
11409            Bytes::new(__input)
11410        };
11411        let mut __struct = Self::default();
11412        __struct.time_usec = buf.get_u64_le()?;
11413        for v in &mut __struct.rpm {
11414            let val = buf.get_i32_le()?;
11415            *v = val;
11416        }
11417        for v in &mut __struct.voltage {
11418            let val = buf.get_f32_le()?;
11419            *v = val;
11420        }
11421        for v in &mut __struct.current {
11422            let val = buf.get_f32_le()?;
11423            *v = val;
11424        }
11425        __struct.index = buf.get_u8()?;
11426        Ok(__struct)
11427    }
11428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11429        let mut __tmp = BytesMut::new(bytes);
11430        #[allow(clippy::absurd_extreme_comparisons)]
11431        #[allow(unused_comparisons)]
11432        if __tmp.remaining() < Self::ENCODED_LEN {
11433            panic!(
11434                "buffer is too small (need {} bytes, but got {})",
11435                Self::ENCODED_LEN,
11436                __tmp.remaining(),
11437            )
11438        }
11439        __tmp.put_u64_le(self.time_usec);
11440        for val in &self.rpm {
11441            __tmp.put_i32_le(*val);
11442        }
11443        for val in &self.voltage {
11444            __tmp.put_f32_le(*val);
11445        }
11446        for val in &self.current {
11447            __tmp.put_f32_le(*val);
11448        }
11449        __tmp.put_u8(self.index);
11450        if matches!(version, MavlinkVersion::V2) {
11451            let len = __tmp.len();
11452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11453        } else {
11454            __tmp.len()
11455        }
11456    }
11457}
11458#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11459#[doc = ""]
11460#[doc = "ID: 230"]
11461#[derive(Debug, Clone, PartialEq)]
11462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11464#[cfg_attr(feature = "ts", derive(TS))]
11465#[cfg_attr(feature = "ts", ts(export))]
11466pub struct ESTIMATOR_STATUS_DATA {
11467    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11468    pub time_usec: u64,
11469    #[doc = "Velocity innovation test ratio"]
11470    pub vel_ratio: f32,
11471    #[doc = "Horizontal position innovation test ratio"]
11472    pub pos_horiz_ratio: f32,
11473    #[doc = "Vertical position innovation test ratio"]
11474    pub pos_vert_ratio: f32,
11475    #[doc = "Magnetometer innovation test ratio"]
11476    pub mag_ratio: f32,
11477    #[doc = "Height above terrain innovation test ratio"]
11478    pub hagl_ratio: f32,
11479    #[doc = "True airspeed innovation test ratio"]
11480    pub tas_ratio: f32,
11481    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11482    pub pos_horiz_accuracy: f32,
11483    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11484    pub pos_vert_accuracy: f32,
11485    #[doc = "Bitmap indicating which EKF outputs are valid."]
11486    pub flags: EstimatorStatusFlags,
11487}
11488impl ESTIMATOR_STATUS_DATA {
11489    pub const ENCODED_LEN: usize = 42usize;
11490    pub const DEFAULT: Self = Self {
11491        time_usec: 0_u64,
11492        vel_ratio: 0.0_f32,
11493        pos_horiz_ratio: 0.0_f32,
11494        pos_vert_ratio: 0.0_f32,
11495        mag_ratio: 0.0_f32,
11496        hagl_ratio: 0.0_f32,
11497        tas_ratio: 0.0_f32,
11498        pos_horiz_accuracy: 0.0_f32,
11499        pos_vert_accuracy: 0.0_f32,
11500        flags: EstimatorStatusFlags::DEFAULT,
11501    };
11502    #[cfg(feature = "arbitrary")]
11503    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11504        use arbitrary::{Arbitrary, Unstructured};
11505        let mut buf = [0u8; 1024];
11506        rng.fill_bytes(&mut buf);
11507        let mut unstructured = Unstructured::new(&buf);
11508        Self::arbitrary(&mut unstructured).unwrap_or_default()
11509    }
11510}
11511impl Default for ESTIMATOR_STATUS_DATA {
11512    fn default() -> Self {
11513        Self::DEFAULT.clone()
11514    }
11515}
11516impl MessageData for ESTIMATOR_STATUS_DATA {
11517    type Message = MavMessage;
11518    const ID: u32 = 230u32;
11519    const NAME: &'static str = "ESTIMATOR_STATUS";
11520    const EXTRA_CRC: u8 = 163u8;
11521    const ENCODED_LEN: usize = 42usize;
11522    fn deser(
11523        _version: MavlinkVersion,
11524        __input: &[u8],
11525    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11526        let avail_len = __input.len();
11527        let mut payload_buf = [0; Self::ENCODED_LEN];
11528        let mut buf = if avail_len < Self::ENCODED_LEN {
11529            payload_buf[0..avail_len].copy_from_slice(__input);
11530            Bytes::new(&payload_buf)
11531        } else {
11532            Bytes::new(__input)
11533        };
11534        let mut __struct = Self::default();
11535        __struct.time_usec = buf.get_u64_le()?;
11536        __struct.vel_ratio = buf.get_f32_le()?;
11537        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11538        __struct.pos_vert_ratio = buf.get_f32_le()?;
11539        __struct.mag_ratio = buf.get_f32_le()?;
11540        __struct.hagl_ratio = buf.get_f32_le()?;
11541        __struct.tas_ratio = buf.get_f32_le()?;
11542        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11543        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11544        let tmp = buf.get_u16_le()?;
11545        __struct.flags = EstimatorStatusFlags::from_bits(
11546            tmp as <EstimatorStatusFlags as Flags>::Bits,
11547        )
11548        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11549            flag_type: "EstimatorStatusFlags",
11550            value: tmp as u64,
11551        })?;
11552        Ok(__struct)
11553    }
11554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11555        let mut __tmp = BytesMut::new(bytes);
11556        #[allow(clippy::absurd_extreme_comparisons)]
11557        #[allow(unused_comparisons)]
11558        if __tmp.remaining() < Self::ENCODED_LEN {
11559            panic!(
11560                "buffer is too small (need {} bytes, but got {})",
11561                Self::ENCODED_LEN,
11562                __tmp.remaining(),
11563            )
11564        }
11565        __tmp.put_u64_le(self.time_usec);
11566        __tmp.put_f32_le(self.vel_ratio);
11567        __tmp.put_f32_le(self.pos_horiz_ratio);
11568        __tmp.put_f32_le(self.pos_vert_ratio);
11569        __tmp.put_f32_le(self.mag_ratio);
11570        __tmp.put_f32_le(self.hagl_ratio);
11571        __tmp.put_f32_le(self.tas_ratio);
11572        __tmp.put_f32_le(self.pos_horiz_accuracy);
11573        __tmp.put_f32_le(self.pos_vert_accuracy);
11574        __tmp.put_u16_le(self.flags.bits() as u16);
11575        if matches!(version, MavlinkVersion::V2) {
11576            let len = __tmp.len();
11577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11578        } else {
11579            __tmp.len()
11580        }
11581    }
11582}
11583#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11584#[doc = ""]
11585#[doc = "ID: 410"]
11586#[derive(Debug, Clone, PartialEq)]
11587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11589#[cfg_attr(feature = "ts", derive(TS))]
11590#[cfg_attr(feature = "ts", ts(export))]
11591pub struct EVENT_DATA {
11592    #[doc = "Event ID (as defined in the component metadata)"]
11593    pub id: u32,
11594    #[doc = "Timestamp (time since system boot when the event happened)."]
11595    pub event_time_boot_ms: u32,
11596    #[doc = "Sequence number."]
11597    pub sequence: u16,
11598    #[doc = "Component ID"]
11599    pub destination_component: u8,
11600    #[doc = "System ID"]
11601    pub destination_system: u8,
11602    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11603    pub log_levels: u8,
11604    #[doc = "Arguments (depend on event ID)."]
11605    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11606    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11607    pub arguments: [u8; 40],
11608}
11609impl EVENT_DATA {
11610    pub const ENCODED_LEN: usize = 53usize;
11611    pub const DEFAULT: Self = Self {
11612        id: 0_u32,
11613        event_time_boot_ms: 0_u32,
11614        sequence: 0_u16,
11615        destination_component: 0_u8,
11616        destination_system: 0_u8,
11617        log_levels: 0_u8,
11618        arguments: [0_u8; 40usize],
11619    };
11620    #[cfg(feature = "arbitrary")]
11621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11622        use arbitrary::{Arbitrary, Unstructured};
11623        let mut buf = [0u8; 1024];
11624        rng.fill_bytes(&mut buf);
11625        let mut unstructured = Unstructured::new(&buf);
11626        Self::arbitrary(&mut unstructured).unwrap_or_default()
11627    }
11628}
11629impl Default for EVENT_DATA {
11630    fn default() -> Self {
11631        Self::DEFAULT.clone()
11632    }
11633}
11634impl MessageData for EVENT_DATA {
11635    type Message = MavMessage;
11636    const ID: u32 = 410u32;
11637    const NAME: &'static str = "EVENT";
11638    const EXTRA_CRC: u8 = 160u8;
11639    const ENCODED_LEN: usize = 53usize;
11640    fn deser(
11641        _version: MavlinkVersion,
11642        __input: &[u8],
11643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11644        let avail_len = __input.len();
11645        let mut payload_buf = [0; Self::ENCODED_LEN];
11646        let mut buf = if avail_len < Self::ENCODED_LEN {
11647            payload_buf[0..avail_len].copy_from_slice(__input);
11648            Bytes::new(&payload_buf)
11649        } else {
11650            Bytes::new(__input)
11651        };
11652        let mut __struct = Self::default();
11653        __struct.id = buf.get_u32_le()?;
11654        __struct.event_time_boot_ms = buf.get_u32_le()?;
11655        __struct.sequence = buf.get_u16_le()?;
11656        __struct.destination_component = buf.get_u8()?;
11657        __struct.destination_system = buf.get_u8()?;
11658        __struct.log_levels = buf.get_u8()?;
11659        for v in &mut __struct.arguments {
11660            let val = buf.get_u8()?;
11661            *v = val;
11662        }
11663        Ok(__struct)
11664    }
11665    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11666        let mut __tmp = BytesMut::new(bytes);
11667        #[allow(clippy::absurd_extreme_comparisons)]
11668        #[allow(unused_comparisons)]
11669        if __tmp.remaining() < Self::ENCODED_LEN {
11670            panic!(
11671                "buffer is too small (need {} bytes, but got {})",
11672                Self::ENCODED_LEN,
11673                __tmp.remaining(),
11674            )
11675        }
11676        __tmp.put_u32_le(self.id);
11677        __tmp.put_u32_le(self.event_time_boot_ms);
11678        __tmp.put_u16_le(self.sequence);
11679        __tmp.put_u8(self.destination_component);
11680        __tmp.put_u8(self.destination_system);
11681        __tmp.put_u8(self.log_levels);
11682        for val in &self.arguments {
11683            __tmp.put_u8(*val);
11684        }
11685        if matches!(version, MavlinkVersion::V2) {
11686            let len = __tmp.len();
11687            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11688        } else {
11689            __tmp.len()
11690        }
11691    }
11692}
11693#[doc = "Provides state for additional features."]
11694#[doc = ""]
11695#[doc = "ID: 245"]
11696#[derive(Debug, Clone, PartialEq)]
11697#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11699#[cfg_attr(feature = "ts", derive(TS))]
11700#[cfg_attr(feature = "ts", ts(export))]
11701pub struct EXTENDED_SYS_STATE_DATA {
11702    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11703    pub vtol_state: MavVtolState,
11704    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11705    pub landed_state: MavLandedState,
11706}
11707impl EXTENDED_SYS_STATE_DATA {
11708    pub const ENCODED_LEN: usize = 2usize;
11709    pub const DEFAULT: Self = Self {
11710        vtol_state: MavVtolState::DEFAULT,
11711        landed_state: MavLandedState::DEFAULT,
11712    };
11713    #[cfg(feature = "arbitrary")]
11714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11715        use arbitrary::{Arbitrary, Unstructured};
11716        let mut buf = [0u8; 1024];
11717        rng.fill_bytes(&mut buf);
11718        let mut unstructured = Unstructured::new(&buf);
11719        Self::arbitrary(&mut unstructured).unwrap_or_default()
11720    }
11721}
11722impl Default for EXTENDED_SYS_STATE_DATA {
11723    fn default() -> Self {
11724        Self::DEFAULT.clone()
11725    }
11726}
11727impl MessageData for EXTENDED_SYS_STATE_DATA {
11728    type Message = MavMessage;
11729    const ID: u32 = 245u32;
11730    const NAME: &'static str = "EXTENDED_SYS_STATE";
11731    const EXTRA_CRC: u8 = 130u8;
11732    const ENCODED_LEN: usize = 2usize;
11733    fn deser(
11734        _version: MavlinkVersion,
11735        __input: &[u8],
11736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11737        let avail_len = __input.len();
11738        let mut payload_buf = [0; Self::ENCODED_LEN];
11739        let mut buf = if avail_len < Self::ENCODED_LEN {
11740            payload_buf[0..avail_len].copy_from_slice(__input);
11741            Bytes::new(&payload_buf)
11742        } else {
11743            Bytes::new(__input)
11744        };
11745        let mut __struct = Self::default();
11746        let tmp = buf.get_u8()?;
11747        __struct.vtol_state =
11748            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11749                enum_type: "MavVtolState",
11750                value: tmp as u64,
11751            })?;
11752        let tmp = buf.get_u8()?;
11753        __struct.landed_state =
11754            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11755                enum_type: "MavLandedState",
11756                value: tmp as u64,
11757            })?;
11758        Ok(__struct)
11759    }
11760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11761        let mut __tmp = BytesMut::new(bytes);
11762        #[allow(clippy::absurd_extreme_comparisons)]
11763        #[allow(unused_comparisons)]
11764        if __tmp.remaining() < Self::ENCODED_LEN {
11765            panic!(
11766                "buffer is too small (need {} bytes, but got {})",
11767                Self::ENCODED_LEN,
11768                __tmp.remaining(),
11769            )
11770        }
11771        __tmp.put_u8(self.vtol_state as u8);
11772        __tmp.put_u8(self.landed_state as u8);
11773        if matches!(version, MavlinkVersion::V2) {
11774            let len = __tmp.len();
11775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11776        } else {
11777            __tmp.len()
11778        }
11779    }
11780}
11781#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11782#[doc = ""]
11783#[doc = "ID: 162"]
11784#[derive(Debug, Clone, PartialEq)]
11785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11787#[cfg_attr(feature = "ts", derive(TS))]
11788#[cfg_attr(feature = "ts", ts(export))]
11789pub struct FENCE_STATUS_DATA {
11790    #[doc = "Time (since boot) of last breach."]
11791    pub breach_time: u32,
11792    #[doc = "Number of fence breaches."]
11793    pub breach_count: u16,
11794    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11795    pub breach_status: u8,
11796    #[doc = "Last breach type."]
11797    pub breach_type: FenceBreach,
11798    #[doc = "Active action to prevent fence breach"]
11799    #[cfg_attr(feature = "serde", serde(default))]
11800    pub breach_mitigation: FenceMitigate,
11801}
11802impl FENCE_STATUS_DATA {
11803    pub const ENCODED_LEN: usize = 9usize;
11804    pub const DEFAULT: Self = Self {
11805        breach_time: 0_u32,
11806        breach_count: 0_u16,
11807        breach_status: 0_u8,
11808        breach_type: FenceBreach::DEFAULT,
11809        breach_mitigation: FenceMitigate::DEFAULT,
11810    };
11811    #[cfg(feature = "arbitrary")]
11812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11813        use arbitrary::{Arbitrary, Unstructured};
11814        let mut buf = [0u8; 1024];
11815        rng.fill_bytes(&mut buf);
11816        let mut unstructured = Unstructured::new(&buf);
11817        Self::arbitrary(&mut unstructured).unwrap_or_default()
11818    }
11819}
11820impl Default for FENCE_STATUS_DATA {
11821    fn default() -> Self {
11822        Self::DEFAULT.clone()
11823    }
11824}
11825impl MessageData for FENCE_STATUS_DATA {
11826    type Message = MavMessage;
11827    const ID: u32 = 162u32;
11828    const NAME: &'static str = "FENCE_STATUS";
11829    const EXTRA_CRC: u8 = 189u8;
11830    const ENCODED_LEN: usize = 9usize;
11831    fn deser(
11832        _version: MavlinkVersion,
11833        __input: &[u8],
11834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11835        let avail_len = __input.len();
11836        let mut payload_buf = [0; Self::ENCODED_LEN];
11837        let mut buf = if avail_len < Self::ENCODED_LEN {
11838            payload_buf[0..avail_len].copy_from_slice(__input);
11839            Bytes::new(&payload_buf)
11840        } else {
11841            Bytes::new(__input)
11842        };
11843        let mut __struct = Self::default();
11844        __struct.breach_time = buf.get_u32_le()?;
11845        __struct.breach_count = buf.get_u16_le()?;
11846        __struct.breach_status = buf.get_u8()?;
11847        let tmp = buf.get_u8()?;
11848        __struct.breach_type =
11849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11850                enum_type: "FenceBreach",
11851                value: tmp as u64,
11852            })?;
11853        let tmp = buf.get_u8()?;
11854        __struct.breach_mitigation =
11855            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11856                enum_type: "FenceMitigate",
11857                value: tmp as u64,
11858            })?;
11859        Ok(__struct)
11860    }
11861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11862        let mut __tmp = BytesMut::new(bytes);
11863        #[allow(clippy::absurd_extreme_comparisons)]
11864        #[allow(unused_comparisons)]
11865        if __tmp.remaining() < Self::ENCODED_LEN {
11866            panic!(
11867                "buffer is too small (need {} bytes, but got {})",
11868                Self::ENCODED_LEN,
11869                __tmp.remaining(),
11870            )
11871        }
11872        __tmp.put_u32_le(self.breach_time);
11873        __tmp.put_u16_le(self.breach_count);
11874        __tmp.put_u8(self.breach_status);
11875        __tmp.put_u8(self.breach_type as u8);
11876        if matches!(version, MavlinkVersion::V2) {
11877            __tmp.put_u8(self.breach_mitigation as u8);
11878            let len = __tmp.len();
11879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11880        } else {
11881            __tmp.len()
11882        }
11883    }
11884}
11885#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11886#[doc = ""]
11887#[doc = "ID: 110"]
11888#[derive(Debug, Clone, PartialEq)]
11889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11891#[cfg_attr(feature = "ts", derive(TS))]
11892#[cfg_attr(feature = "ts", ts(export))]
11893pub struct FILE_TRANSFER_PROTOCOL_DATA {
11894    #[doc = "Network ID (0 for broadcast)"]
11895    pub target_network: u8,
11896    #[doc = "System ID (0 for broadcast)"]
11897    pub target_system: u8,
11898    #[doc = "Component ID (0 for broadcast)"]
11899    pub target_component: u8,
11900    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11901    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11902    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11903    pub payload: [u8; 251],
11904}
11905impl FILE_TRANSFER_PROTOCOL_DATA {
11906    pub const ENCODED_LEN: usize = 254usize;
11907    pub const DEFAULT: Self = Self {
11908        target_network: 0_u8,
11909        target_system: 0_u8,
11910        target_component: 0_u8,
11911        payload: [0_u8; 251usize],
11912    };
11913    #[cfg(feature = "arbitrary")]
11914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11915        use arbitrary::{Arbitrary, Unstructured};
11916        let mut buf = [0u8; 1024];
11917        rng.fill_bytes(&mut buf);
11918        let mut unstructured = Unstructured::new(&buf);
11919        Self::arbitrary(&mut unstructured).unwrap_or_default()
11920    }
11921}
11922impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11923    fn default() -> Self {
11924        Self::DEFAULT.clone()
11925    }
11926}
11927impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11928    type Message = MavMessage;
11929    const ID: u32 = 110u32;
11930    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11931    const EXTRA_CRC: u8 = 84u8;
11932    const ENCODED_LEN: usize = 254usize;
11933    fn deser(
11934        _version: MavlinkVersion,
11935        __input: &[u8],
11936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11937        let avail_len = __input.len();
11938        let mut payload_buf = [0; Self::ENCODED_LEN];
11939        let mut buf = if avail_len < Self::ENCODED_LEN {
11940            payload_buf[0..avail_len].copy_from_slice(__input);
11941            Bytes::new(&payload_buf)
11942        } else {
11943            Bytes::new(__input)
11944        };
11945        let mut __struct = Self::default();
11946        __struct.target_network = buf.get_u8()?;
11947        __struct.target_system = buf.get_u8()?;
11948        __struct.target_component = buf.get_u8()?;
11949        for v in &mut __struct.payload {
11950            let val = buf.get_u8()?;
11951            *v = val;
11952        }
11953        Ok(__struct)
11954    }
11955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11956        let mut __tmp = BytesMut::new(bytes);
11957        #[allow(clippy::absurd_extreme_comparisons)]
11958        #[allow(unused_comparisons)]
11959        if __tmp.remaining() < Self::ENCODED_LEN {
11960            panic!(
11961                "buffer is too small (need {} bytes, but got {})",
11962                Self::ENCODED_LEN,
11963                __tmp.remaining(),
11964            )
11965        }
11966        __tmp.put_u8(self.target_network);
11967        __tmp.put_u8(self.target_system);
11968        __tmp.put_u8(self.target_component);
11969        for val in &self.payload {
11970            __tmp.put_u8(*val);
11971        }
11972        if matches!(version, MavlinkVersion::V2) {
11973            let len = __tmp.len();
11974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11975        } else {
11976            __tmp.len()
11977        }
11978    }
11979}
11980#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11981#[doc = ""]
11982#[doc = "ID: 264"]
11983#[derive(Debug, Clone, PartialEq)]
11984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11986#[cfg_attr(feature = "ts", derive(TS))]
11987#[cfg_attr(feature = "ts", ts(export))]
11988pub struct FLIGHT_INFORMATION_DATA {
11989    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11990    pub arming_time_utc: u64,
11991    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11992    pub takeoff_time_utc: u64,
11993    #[doc = "Flight number. Note, field is misnamed UUID."]
11994    pub flight_uuid: u64,
11995    #[doc = "Timestamp (time since system boot)."]
11996    pub time_boot_ms: u32,
11997    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11999    pub landing_time: u32,
12000}
12001impl FLIGHT_INFORMATION_DATA {
12002    pub const ENCODED_LEN: usize = 32usize;
12003    pub const DEFAULT: Self = Self {
12004        arming_time_utc: 0_u64,
12005        takeoff_time_utc: 0_u64,
12006        flight_uuid: 0_u64,
12007        time_boot_ms: 0_u32,
12008        landing_time: 0_u32,
12009    };
12010    #[cfg(feature = "arbitrary")]
12011    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12012        use arbitrary::{Arbitrary, Unstructured};
12013        let mut buf = [0u8; 1024];
12014        rng.fill_bytes(&mut buf);
12015        let mut unstructured = Unstructured::new(&buf);
12016        Self::arbitrary(&mut unstructured).unwrap_or_default()
12017    }
12018}
12019impl Default for FLIGHT_INFORMATION_DATA {
12020    fn default() -> Self {
12021        Self::DEFAULT.clone()
12022    }
12023}
12024impl MessageData for FLIGHT_INFORMATION_DATA {
12025    type Message = MavMessage;
12026    const ID: u32 = 264u32;
12027    const NAME: &'static str = "FLIGHT_INFORMATION";
12028    const EXTRA_CRC: u8 = 49u8;
12029    const ENCODED_LEN: usize = 32usize;
12030    fn deser(
12031        _version: MavlinkVersion,
12032        __input: &[u8],
12033    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12034        let avail_len = __input.len();
12035        let mut payload_buf = [0; Self::ENCODED_LEN];
12036        let mut buf = if avail_len < Self::ENCODED_LEN {
12037            payload_buf[0..avail_len].copy_from_slice(__input);
12038            Bytes::new(&payload_buf)
12039        } else {
12040            Bytes::new(__input)
12041        };
12042        let mut __struct = Self::default();
12043        __struct.arming_time_utc = buf.get_u64_le()?;
12044        __struct.takeoff_time_utc = buf.get_u64_le()?;
12045        __struct.flight_uuid = buf.get_u64_le()?;
12046        __struct.time_boot_ms = buf.get_u32_le()?;
12047        __struct.landing_time = buf.get_u32_le()?;
12048        Ok(__struct)
12049    }
12050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12051        let mut __tmp = BytesMut::new(bytes);
12052        #[allow(clippy::absurd_extreme_comparisons)]
12053        #[allow(unused_comparisons)]
12054        if __tmp.remaining() < Self::ENCODED_LEN {
12055            panic!(
12056                "buffer is too small (need {} bytes, but got {})",
12057                Self::ENCODED_LEN,
12058                __tmp.remaining(),
12059            )
12060        }
12061        __tmp.put_u64_le(self.arming_time_utc);
12062        __tmp.put_u64_le(self.takeoff_time_utc);
12063        __tmp.put_u64_le(self.flight_uuid);
12064        __tmp.put_u32_le(self.time_boot_ms);
12065        if matches!(version, MavlinkVersion::V2) {
12066            __tmp.put_u32_le(self.landing_time);
12067            let len = __tmp.len();
12068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12069        } else {
12070            __tmp.len()
12071        }
12072    }
12073}
12074#[doc = "Current motion information from a designated system."]
12075#[doc = ""]
12076#[doc = "ID: 144"]
12077#[derive(Debug, Clone, PartialEq)]
12078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12080#[cfg_attr(feature = "ts", derive(TS))]
12081#[cfg_attr(feature = "ts", ts(export))]
12082pub struct FOLLOW_TARGET_DATA {
12083    #[doc = "Timestamp (time since system boot)."]
12084    pub timestamp: u64,
12085    #[doc = "button states or switches of a tracker device"]
12086    pub custom_state: u64,
12087    #[doc = "Latitude (WGS84)"]
12088    pub lat: i32,
12089    #[doc = "Longitude (WGS84)"]
12090    pub lon: i32,
12091    #[doc = "Altitude (MSL)"]
12092    pub alt: f32,
12093    #[doc = "target velocity (0,0,0) for unknown"]
12094    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12095    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12096    pub vel: [f32; 3],
12097    #[doc = "linear target acceleration (0,0,0) for unknown"]
12098    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12099    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12100    pub acc: [f32; 3],
12101    #[doc = "(0 0 0 0 for unknown)"]
12102    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12103    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12104    pub attitude_q: [f32; 4],
12105    #[doc = "(0 0 0 for unknown)"]
12106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12107    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12108    pub rates: [f32; 3],
12109    #[doc = "eph epv"]
12110    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12111    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12112    pub position_cov: [f32; 3],
12113    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12114    pub est_capabilities: u8,
12115}
12116impl FOLLOW_TARGET_DATA {
12117    pub const ENCODED_LEN: usize = 93usize;
12118    pub const DEFAULT: Self = Self {
12119        timestamp: 0_u64,
12120        custom_state: 0_u64,
12121        lat: 0_i32,
12122        lon: 0_i32,
12123        alt: 0.0_f32,
12124        vel: [0.0_f32; 3usize],
12125        acc: [0.0_f32; 3usize],
12126        attitude_q: [0.0_f32; 4usize],
12127        rates: [0.0_f32; 3usize],
12128        position_cov: [0.0_f32; 3usize],
12129        est_capabilities: 0_u8,
12130    };
12131    #[cfg(feature = "arbitrary")]
12132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12133        use arbitrary::{Arbitrary, Unstructured};
12134        let mut buf = [0u8; 1024];
12135        rng.fill_bytes(&mut buf);
12136        let mut unstructured = Unstructured::new(&buf);
12137        Self::arbitrary(&mut unstructured).unwrap_or_default()
12138    }
12139}
12140impl Default for FOLLOW_TARGET_DATA {
12141    fn default() -> Self {
12142        Self::DEFAULT.clone()
12143    }
12144}
12145impl MessageData for FOLLOW_TARGET_DATA {
12146    type Message = MavMessage;
12147    const ID: u32 = 144u32;
12148    const NAME: &'static str = "FOLLOW_TARGET";
12149    const EXTRA_CRC: u8 = 127u8;
12150    const ENCODED_LEN: usize = 93usize;
12151    fn deser(
12152        _version: MavlinkVersion,
12153        __input: &[u8],
12154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12155        let avail_len = __input.len();
12156        let mut payload_buf = [0; Self::ENCODED_LEN];
12157        let mut buf = if avail_len < Self::ENCODED_LEN {
12158            payload_buf[0..avail_len].copy_from_slice(__input);
12159            Bytes::new(&payload_buf)
12160        } else {
12161            Bytes::new(__input)
12162        };
12163        let mut __struct = Self::default();
12164        __struct.timestamp = buf.get_u64_le()?;
12165        __struct.custom_state = buf.get_u64_le()?;
12166        __struct.lat = buf.get_i32_le()?;
12167        __struct.lon = buf.get_i32_le()?;
12168        __struct.alt = buf.get_f32_le()?;
12169        for v in &mut __struct.vel {
12170            let val = buf.get_f32_le()?;
12171            *v = val;
12172        }
12173        for v in &mut __struct.acc {
12174            let val = buf.get_f32_le()?;
12175            *v = val;
12176        }
12177        for v in &mut __struct.attitude_q {
12178            let val = buf.get_f32_le()?;
12179            *v = val;
12180        }
12181        for v in &mut __struct.rates {
12182            let val = buf.get_f32_le()?;
12183            *v = val;
12184        }
12185        for v in &mut __struct.position_cov {
12186            let val = buf.get_f32_le()?;
12187            *v = val;
12188        }
12189        __struct.est_capabilities = buf.get_u8()?;
12190        Ok(__struct)
12191    }
12192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12193        let mut __tmp = BytesMut::new(bytes);
12194        #[allow(clippy::absurd_extreme_comparisons)]
12195        #[allow(unused_comparisons)]
12196        if __tmp.remaining() < Self::ENCODED_LEN {
12197            panic!(
12198                "buffer is too small (need {} bytes, but got {})",
12199                Self::ENCODED_LEN,
12200                __tmp.remaining(),
12201            )
12202        }
12203        __tmp.put_u64_le(self.timestamp);
12204        __tmp.put_u64_le(self.custom_state);
12205        __tmp.put_i32_le(self.lat);
12206        __tmp.put_i32_le(self.lon);
12207        __tmp.put_f32_le(self.alt);
12208        for val in &self.vel {
12209            __tmp.put_f32_le(*val);
12210        }
12211        for val in &self.acc {
12212            __tmp.put_f32_le(*val);
12213        }
12214        for val in &self.attitude_q {
12215            __tmp.put_f32_le(*val);
12216        }
12217        for val in &self.rates {
12218            __tmp.put_f32_le(*val);
12219        }
12220        for val in &self.position_cov {
12221            __tmp.put_f32_le(*val);
12222        }
12223        __tmp.put_u8(self.est_capabilities);
12224        if matches!(version, MavlinkVersion::V2) {
12225            let len = __tmp.len();
12226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12227        } else {
12228            __tmp.len()
12229        }
12230    }
12231}
12232#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12233#[doc = ""]
12234#[doc = "ID: 371"]
12235#[derive(Debug, Clone, PartialEq)]
12236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12238#[cfg_attr(feature = "ts", derive(TS))]
12239#[cfg_attr(feature = "ts", ts(export))]
12240pub struct FUEL_STATUS_DATA {
12241    #[doc = "Capacity when full. Must be provided."]
12242    pub maximum_fuel: f32,
12243    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12244    pub consumed_fuel: f32,
12245    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12246    pub remaining_fuel: f32,
12247    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12248    pub flow_rate: f32,
12249    #[doc = "Fuel temperature. NaN: field not provided."]
12250    pub temperature: f32,
12251    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12252    pub fuel_type: MavFuelType,
12253    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12254    pub id: u8,
12255    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12256    pub percent_remaining: u8,
12257}
12258impl FUEL_STATUS_DATA {
12259    pub const ENCODED_LEN: usize = 26usize;
12260    pub const DEFAULT: Self = Self {
12261        maximum_fuel: 0.0_f32,
12262        consumed_fuel: 0.0_f32,
12263        remaining_fuel: 0.0_f32,
12264        flow_rate: 0.0_f32,
12265        temperature: 0.0_f32,
12266        fuel_type: MavFuelType::DEFAULT,
12267        id: 0_u8,
12268        percent_remaining: 0_u8,
12269    };
12270    #[cfg(feature = "arbitrary")]
12271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12272        use arbitrary::{Arbitrary, Unstructured};
12273        let mut buf = [0u8; 1024];
12274        rng.fill_bytes(&mut buf);
12275        let mut unstructured = Unstructured::new(&buf);
12276        Self::arbitrary(&mut unstructured).unwrap_or_default()
12277    }
12278}
12279impl Default for FUEL_STATUS_DATA {
12280    fn default() -> Self {
12281        Self::DEFAULT.clone()
12282    }
12283}
12284impl MessageData for FUEL_STATUS_DATA {
12285    type Message = MavMessage;
12286    const ID: u32 = 371u32;
12287    const NAME: &'static str = "FUEL_STATUS";
12288    const EXTRA_CRC: u8 = 10u8;
12289    const ENCODED_LEN: usize = 26usize;
12290    fn deser(
12291        _version: MavlinkVersion,
12292        __input: &[u8],
12293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12294        let avail_len = __input.len();
12295        let mut payload_buf = [0; Self::ENCODED_LEN];
12296        let mut buf = if avail_len < Self::ENCODED_LEN {
12297            payload_buf[0..avail_len].copy_from_slice(__input);
12298            Bytes::new(&payload_buf)
12299        } else {
12300            Bytes::new(__input)
12301        };
12302        let mut __struct = Self::default();
12303        __struct.maximum_fuel = buf.get_f32_le()?;
12304        __struct.consumed_fuel = buf.get_f32_le()?;
12305        __struct.remaining_fuel = buf.get_f32_le()?;
12306        __struct.flow_rate = buf.get_f32_le()?;
12307        __struct.temperature = buf.get_f32_le()?;
12308        let tmp = buf.get_u32_le()?;
12309        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12310            ::mavlink_core::error::ParserError::InvalidEnum {
12311                enum_type: "MavFuelType",
12312                value: tmp as u64,
12313            },
12314        )?;
12315        __struct.id = buf.get_u8()?;
12316        __struct.percent_remaining = buf.get_u8()?;
12317        Ok(__struct)
12318    }
12319    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12320        let mut __tmp = BytesMut::new(bytes);
12321        #[allow(clippy::absurd_extreme_comparisons)]
12322        #[allow(unused_comparisons)]
12323        if __tmp.remaining() < Self::ENCODED_LEN {
12324            panic!(
12325                "buffer is too small (need {} bytes, but got {})",
12326                Self::ENCODED_LEN,
12327                __tmp.remaining(),
12328            )
12329        }
12330        __tmp.put_f32_le(self.maximum_fuel);
12331        __tmp.put_f32_le(self.consumed_fuel);
12332        __tmp.put_f32_le(self.remaining_fuel);
12333        __tmp.put_f32_le(self.flow_rate);
12334        __tmp.put_f32_le(self.temperature);
12335        __tmp.put_u32_le(self.fuel_type as u32);
12336        __tmp.put_u8(self.id);
12337        __tmp.put_u8(self.percent_remaining);
12338        if matches!(version, MavlinkVersion::V2) {
12339            let len = __tmp.len();
12340            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12341        } else {
12342            __tmp.len()
12343        }
12344    }
12345}
12346#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12347#[doc = ""]
12348#[doc = "ID: 373"]
12349#[derive(Debug, Clone, PartialEq)]
12350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12352#[cfg_attr(feature = "ts", derive(TS))]
12353#[cfg_attr(feature = "ts", ts(export))]
12354pub struct GENERATOR_STATUS_DATA {
12355    #[doc = "Status flags."]
12356    pub status: MavGeneratorStatusFlag,
12357    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12358    pub battery_current: f32,
12359    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12360    pub load_current: f32,
12361    #[doc = "The power being generated. NaN: field not provided"]
12362    pub power_generated: f32,
12363    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12364    pub bus_voltage: f32,
12365    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12366    pub bat_current_setpoint: f32,
12367    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12368    pub runtime: u32,
12369    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12370    pub time_until_maintenance: i32,
12371    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12372    pub generator_speed: u16,
12373    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12374    pub rectifier_temperature: i16,
12375    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12376    pub generator_temperature: i16,
12377}
12378impl GENERATOR_STATUS_DATA {
12379    pub const ENCODED_LEN: usize = 42usize;
12380    pub const DEFAULT: Self = Self {
12381        status: MavGeneratorStatusFlag::DEFAULT,
12382        battery_current: 0.0_f32,
12383        load_current: 0.0_f32,
12384        power_generated: 0.0_f32,
12385        bus_voltage: 0.0_f32,
12386        bat_current_setpoint: 0.0_f32,
12387        runtime: 0_u32,
12388        time_until_maintenance: 0_i32,
12389        generator_speed: 0_u16,
12390        rectifier_temperature: 0_i16,
12391        generator_temperature: 0_i16,
12392    };
12393    #[cfg(feature = "arbitrary")]
12394    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12395        use arbitrary::{Arbitrary, Unstructured};
12396        let mut buf = [0u8; 1024];
12397        rng.fill_bytes(&mut buf);
12398        let mut unstructured = Unstructured::new(&buf);
12399        Self::arbitrary(&mut unstructured).unwrap_or_default()
12400    }
12401}
12402impl Default for GENERATOR_STATUS_DATA {
12403    fn default() -> Self {
12404        Self::DEFAULT.clone()
12405    }
12406}
12407impl MessageData for GENERATOR_STATUS_DATA {
12408    type Message = MavMessage;
12409    const ID: u32 = 373u32;
12410    const NAME: &'static str = "GENERATOR_STATUS";
12411    const EXTRA_CRC: u8 = 117u8;
12412    const ENCODED_LEN: usize = 42usize;
12413    fn deser(
12414        _version: MavlinkVersion,
12415        __input: &[u8],
12416    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12417        let avail_len = __input.len();
12418        let mut payload_buf = [0; Self::ENCODED_LEN];
12419        let mut buf = if avail_len < Self::ENCODED_LEN {
12420            payload_buf[0..avail_len].copy_from_slice(__input);
12421            Bytes::new(&payload_buf)
12422        } else {
12423            Bytes::new(__input)
12424        };
12425        let mut __struct = Self::default();
12426        let tmp = buf.get_u64_le()?;
12427        __struct.status =
12428            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12429                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12430                    flag_type: "MavGeneratorStatusFlag",
12431                    value: tmp as u64,
12432                })?;
12433        __struct.battery_current = buf.get_f32_le()?;
12434        __struct.load_current = buf.get_f32_le()?;
12435        __struct.power_generated = buf.get_f32_le()?;
12436        __struct.bus_voltage = buf.get_f32_le()?;
12437        __struct.bat_current_setpoint = buf.get_f32_le()?;
12438        __struct.runtime = buf.get_u32_le()?;
12439        __struct.time_until_maintenance = buf.get_i32_le()?;
12440        __struct.generator_speed = buf.get_u16_le()?;
12441        __struct.rectifier_temperature = buf.get_i16_le()?;
12442        __struct.generator_temperature = buf.get_i16_le()?;
12443        Ok(__struct)
12444    }
12445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12446        let mut __tmp = BytesMut::new(bytes);
12447        #[allow(clippy::absurd_extreme_comparisons)]
12448        #[allow(unused_comparisons)]
12449        if __tmp.remaining() < Self::ENCODED_LEN {
12450            panic!(
12451                "buffer is too small (need {} bytes, but got {})",
12452                Self::ENCODED_LEN,
12453                __tmp.remaining(),
12454            )
12455        }
12456        __tmp.put_u64_le(self.status.bits() as u64);
12457        __tmp.put_f32_le(self.battery_current);
12458        __tmp.put_f32_le(self.load_current);
12459        __tmp.put_f32_le(self.power_generated);
12460        __tmp.put_f32_le(self.bus_voltage);
12461        __tmp.put_f32_le(self.bat_current_setpoint);
12462        __tmp.put_u32_le(self.runtime);
12463        __tmp.put_i32_le(self.time_until_maintenance);
12464        __tmp.put_u16_le(self.generator_speed);
12465        __tmp.put_i16_le(self.rectifier_temperature);
12466        __tmp.put_i16_le(self.generator_temperature);
12467        if matches!(version, MavlinkVersion::V2) {
12468            let len = __tmp.len();
12469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12470        } else {
12471            __tmp.len()
12472        }
12473    }
12474}
12475#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12476#[doc = ""]
12477#[doc = "ID: 285"]
12478#[derive(Debug, Clone, PartialEq)]
12479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12481#[cfg_attr(feature = "ts", derive(TS))]
12482#[cfg_attr(feature = "ts", ts(export))]
12483pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12484    #[doc = "Timestamp (time since system boot)."]
12485    pub time_boot_ms: u32,
12486    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12489    pub q: [f32; 4],
12490    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12491    pub angular_velocity_x: f32,
12492    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12493    pub angular_velocity_y: f32,
12494    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12495    pub angular_velocity_z: f32,
12496    #[doc = "Failure flags (0 for no failure)"]
12497    pub failure_flags: GimbalDeviceErrorFlags,
12498    #[doc = "Current gimbal flags set."]
12499    pub flags: GimbalDeviceFlags,
12500    #[doc = "System ID"]
12501    pub target_system: u8,
12502    #[doc = "Component ID"]
12503    pub target_component: u8,
12504    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12505    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12506    pub delta_yaw: f32,
12507    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12508    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12509    pub delta_yaw_velocity: f32,
12510    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12512    pub gimbal_device_id: u8,
12513}
12514impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12515    pub const ENCODED_LEN: usize = 49usize;
12516    pub const DEFAULT: Self = Self {
12517        time_boot_ms: 0_u32,
12518        q: [0.0_f32; 4usize],
12519        angular_velocity_x: 0.0_f32,
12520        angular_velocity_y: 0.0_f32,
12521        angular_velocity_z: 0.0_f32,
12522        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12523        flags: GimbalDeviceFlags::DEFAULT,
12524        target_system: 0_u8,
12525        target_component: 0_u8,
12526        delta_yaw: 0.0_f32,
12527        delta_yaw_velocity: 0.0_f32,
12528        gimbal_device_id: 0_u8,
12529    };
12530    #[cfg(feature = "arbitrary")]
12531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12532        use arbitrary::{Arbitrary, Unstructured};
12533        let mut buf = [0u8; 1024];
12534        rng.fill_bytes(&mut buf);
12535        let mut unstructured = Unstructured::new(&buf);
12536        Self::arbitrary(&mut unstructured).unwrap_or_default()
12537    }
12538}
12539impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12540    fn default() -> Self {
12541        Self::DEFAULT.clone()
12542    }
12543}
12544impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12545    type Message = MavMessage;
12546    const ID: u32 = 285u32;
12547    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12548    const EXTRA_CRC: u8 = 137u8;
12549    const ENCODED_LEN: usize = 49usize;
12550    fn deser(
12551        _version: MavlinkVersion,
12552        __input: &[u8],
12553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12554        let avail_len = __input.len();
12555        let mut payload_buf = [0; Self::ENCODED_LEN];
12556        let mut buf = if avail_len < Self::ENCODED_LEN {
12557            payload_buf[0..avail_len].copy_from_slice(__input);
12558            Bytes::new(&payload_buf)
12559        } else {
12560            Bytes::new(__input)
12561        };
12562        let mut __struct = Self::default();
12563        __struct.time_boot_ms = buf.get_u32_le()?;
12564        for v in &mut __struct.q {
12565            let val = buf.get_f32_le()?;
12566            *v = val;
12567        }
12568        __struct.angular_velocity_x = buf.get_f32_le()?;
12569        __struct.angular_velocity_y = buf.get_f32_le()?;
12570        __struct.angular_velocity_z = buf.get_f32_le()?;
12571        let tmp = buf.get_u32_le()?;
12572        __struct.failure_flags =
12573            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12574                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12575                    flag_type: "GimbalDeviceErrorFlags",
12576                    value: tmp as u64,
12577                })?;
12578        let tmp = buf.get_u16_le()?;
12579        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12580            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12581                flag_type: "GimbalDeviceFlags",
12582                value: tmp as u64,
12583            })?;
12584        __struct.target_system = buf.get_u8()?;
12585        __struct.target_component = buf.get_u8()?;
12586        __struct.delta_yaw = buf.get_f32_le()?;
12587        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12588        __struct.gimbal_device_id = buf.get_u8()?;
12589        Ok(__struct)
12590    }
12591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12592        let mut __tmp = BytesMut::new(bytes);
12593        #[allow(clippy::absurd_extreme_comparisons)]
12594        #[allow(unused_comparisons)]
12595        if __tmp.remaining() < Self::ENCODED_LEN {
12596            panic!(
12597                "buffer is too small (need {} bytes, but got {})",
12598                Self::ENCODED_LEN,
12599                __tmp.remaining(),
12600            )
12601        }
12602        __tmp.put_u32_le(self.time_boot_ms);
12603        for val in &self.q {
12604            __tmp.put_f32_le(*val);
12605        }
12606        __tmp.put_f32_le(self.angular_velocity_x);
12607        __tmp.put_f32_le(self.angular_velocity_y);
12608        __tmp.put_f32_le(self.angular_velocity_z);
12609        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12610        __tmp.put_u16_le(self.flags.bits() as u16);
12611        __tmp.put_u8(self.target_system);
12612        __tmp.put_u8(self.target_component);
12613        if matches!(version, MavlinkVersion::V2) {
12614            __tmp.put_f32_le(self.delta_yaw);
12615            __tmp.put_f32_le(self.delta_yaw_velocity);
12616            __tmp.put_u8(self.gimbal_device_id);
12617            let len = __tmp.len();
12618            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12619        } else {
12620            __tmp.len()
12621        }
12622    }
12623}
12624#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12625#[doc = ""]
12626#[doc = "ID: 283"]
12627#[derive(Debug, Clone, PartialEq)]
12628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12630#[cfg_attr(feature = "ts", derive(TS))]
12631#[cfg_attr(feature = "ts", ts(export))]
12632pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12633    #[doc = "UID of gimbal hardware (0 if unknown)."]
12634    pub uid: u64,
12635    #[doc = "Timestamp (time since system boot)."]
12636    pub time_boot_ms: u32,
12637    #[doc = "0xff)."]
12638    pub firmware_version: u32,
12639    #[doc = "0xff)."]
12640    pub hardware_version: u32,
12641    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12642    pub roll_min: f32,
12643    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12644    pub roll_max: f32,
12645    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12646    pub pitch_min: f32,
12647    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12648    pub pitch_max: f32,
12649    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12650    pub yaw_min: f32,
12651    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12652    pub yaw_max: f32,
12653    #[doc = "Bitmap of gimbal capability flags."]
12654    pub cap_flags: GimbalDeviceCapFlags,
12655    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12656    pub custom_cap_flags: u16,
12657    #[doc = "Name of the gimbal vendor."]
12658    #[cfg_attr(feature = "ts", ts(type = "string"))]
12659    pub vendor_name: CharArray<32>,
12660    #[doc = "Name of the gimbal model."]
12661    #[cfg_attr(feature = "ts", ts(type = "string"))]
12662    pub model_name: CharArray<32>,
12663    #[doc = "Custom name of the gimbal given to it by the user."]
12664    #[cfg_attr(feature = "ts", ts(type = "string"))]
12665    pub custom_name: CharArray<32>,
12666    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12668    pub gimbal_device_id: u8,
12669}
12670impl GIMBAL_DEVICE_INFORMATION_DATA {
12671    pub const ENCODED_LEN: usize = 145usize;
12672    pub const DEFAULT: Self = Self {
12673        uid: 0_u64,
12674        time_boot_ms: 0_u32,
12675        firmware_version: 0_u32,
12676        hardware_version: 0_u32,
12677        roll_min: 0.0_f32,
12678        roll_max: 0.0_f32,
12679        pitch_min: 0.0_f32,
12680        pitch_max: 0.0_f32,
12681        yaw_min: 0.0_f32,
12682        yaw_max: 0.0_f32,
12683        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12684        custom_cap_flags: 0_u16,
12685        vendor_name: CharArray::new([0_u8; 32usize]),
12686        model_name: CharArray::new([0_u8; 32usize]),
12687        custom_name: CharArray::new([0_u8; 32usize]),
12688        gimbal_device_id: 0_u8,
12689    };
12690    #[cfg(feature = "arbitrary")]
12691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12692        use arbitrary::{Arbitrary, Unstructured};
12693        let mut buf = [0u8; 1024];
12694        rng.fill_bytes(&mut buf);
12695        let mut unstructured = Unstructured::new(&buf);
12696        Self::arbitrary(&mut unstructured).unwrap_or_default()
12697    }
12698}
12699impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12700    fn default() -> Self {
12701        Self::DEFAULT.clone()
12702    }
12703}
12704impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12705    type Message = MavMessage;
12706    const ID: u32 = 283u32;
12707    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12708    const EXTRA_CRC: u8 = 74u8;
12709    const ENCODED_LEN: usize = 145usize;
12710    fn deser(
12711        _version: MavlinkVersion,
12712        __input: &[u8],
12713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12714        let avail_len = __input.len();
12715        let mut payload_buf = [0; Self::ENCODED_LEN];
12716        let mut buf = if avail_len < Self::ENCODED_LEN {
12717            payload_buf[0..avail_len].copy_from_slice(__input);
12718            Bytes::new(&payload_buf)
12719        } else {
12720            Bytes::new(__input)
12721        };
12722        let mut __struct = Self::default();
12723        __struct.uid = buf.get_u64_le()?;
12724        __struct.time_boot_ms = buf.get_u32_le()?;
12725        __struct.firmware_version = buf.get_u32_le()?;
12726        __struct.hardware_version = buf.get_u32_le()?;
12727        __struct.roll_min = buf.get_f32_le()?;
12728        __struct.roll_max = buf.get_f32_le()?;
12729        __struct.pitch_min = buf.get_f32_le()?;
12730        __struct.pitch_max = buf.get_f32_le()?;
12731        __struct.yaw_min = buf.get_f32_le()?;
12732        __struct.yaw_max = buf.get_f32_le()?;
12733        let tmp = buf.get_u16_le()?;
12734        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12735            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12736        )
12737        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12738            flag_type: "GimbalDeviceCapFlags",
12739            value: tmp as u64,
12740        })?;
12741        __struct.custom_cap_flags = buf.get_u16_le()?;
12742        let mut tmp = [0_u8; 32usize];
12743        for v in &mut tmp {
12744            *v = buf.get_u8()?;
12745        }
12746        __struct.vendor_name = CharArray::new(tmp);
12747        let mut tmp = [0_u8; 32usize];
12748        for v in &mut tmp {
12749            *v = buf.get_u8()?;
12750        }
12751        __struct.model_name = CharArray::new(tmp);
12752        let mut tmp = [0_u8; 32usize];
12753        for v in &mut tmp {
12754            *v = buf.get_u8()?;
12755        }
12756        __struct.custom_name = CharArray::new(tmp);
12757        __struct.gimbal_device_id = buf.get_u8()?;
12758        Ok(__struct)
12759    }
12760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12761        let mut __tmp = BytesMut::new(bytes);
12762        #[allow(clippy::absurd_extreme_comparisons)]
12763        #[allow(unused_comparisons)]
12764        if __tmp.remaining() < Self::ENCODED_LEN {
12765            panic!(
12766                "buffer is too small (need {} bytes, but got {})",
12767                Self::ENCODED_LEN,
12768                __tmp.remaining(),
12769            )
12770        }
12771        __tmp.put_u64_le(self.uid);
12772        __tmp.put_u32_le(self.time_boot_ms);
12773        __tmp.put_u32_le(self.firmware_version);
12774        __tmp.put_u32_le(self.hardware_version);
12775        __tmp.put_f32_le(self.roll_min);
12776        __tmp.put_f32_le(self.roll_max);
12777        __tmp.put_f32_le(self.pitch_min);
12778        __tmp.put_f32_le(self.pitch_max);
12779        __tmp.put_f32_le(self.yaw_min);
12780        __tmp.put_f32_le(self.yaw_max);
12781        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12782        __tmp.put_u16_le(self.custom_cap_flags);
12783        for val in &self.vendor_name {
12784            __tmp.put_u8(*val);
12785        }
12786        for val in &self.model_name {
12787            __tmp.put_u8(*val);
12788        }
12789        for val in &self.custom_name {
12790            __tmp.put_u8(*val);
12791        }
12792        if matches!(version, MavlinkVersion::V2) {
12793            __tmp.put_u8(self.gimbal_device_id);
12794            let len = __tmp.len();
12795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12796        } else {
12797            __tmp.len()
12798        }
12799    }
12800}
12801#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12802#[doc = ""]
12803#[doc = "ID: 284"]
12804#[derive(Debug, Clone, PartialEq)]
12805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12807#[cfg_attr(feature = "ts", derive(TS))]
12808#[cfg_attr(feature = "ts", ts(export))]
12809pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12810    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12812    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12813    pub q: [f32; 4],
12814    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12815    pub angular_velocity_x: f32,
12816    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12817    pub angular_velocity_y: f32,
12818    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12819    pub angular_velocity_z: f32,
12820    #[doc = "Low level gimbal flags."]
12821    pub flags: GimbalDeviceFlags,
12822    #[doc = "System ID"]
12823    pub target_system: u8,
12824    #[doc = "Component ID"]
12825    pub target_component: u8,
12826}
12827impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12828    pub const ENCODED_LEN: usize = 32usize;
12829    pub const DEFAULT: Self = Self {
12830        q: [0.0_f32; 4usize],
12831        angular_velocity_x: 0.0_f32,
12832        angular_velocity_y: 0.0_f32,
12833        angular_velocity_z: 0.0_f32,
12834        flags: GimbalDeviceFlags::DEFAULT,
12835        target_system: 0_u8,
12836        target_component: 0_u8,
12837    };
12838    #[cfg(feature = "arbitrary")]
12839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12840        use arbitrary::{Arbitrary, Unstructured};
12841        let mut buf = [0u8; 1024];
12842        rng.fill_bytes(&mut buf);
12843        let mut unstructured = Unstructured::new(&buf);
12844        Self::arbitrary(&mut unstructured).unwrap_or_default()
12845    }
12846}
12847impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12848    fn default() -> Self {
12849        Self::DEFAULT.clone()
12850    }
12851}
12852impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12853    type Message = MavMessage;
12854    const ID: u32 = 284u32;
12855    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12856    const EXTRA_CRC: u8 = 99u8;
12857    const ENCODED_LEN: usize = 32usize;
12858    fn deser(
12859        _version: MavlinkVersion,
12860        __input: &[u8],
12861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12862        let avail_len = __input.len();
12863        let mut payload_buf = [0; Self::ENCODED_LEN];
12864        let mut buf = if avail_len < Self::ENCODED_LEN {
12865            payload_buf[0..avail_len].copy_from_slice(__input);
12866            Bytes::new(&payload_buf)
12867        } else {
12868            Bytes::new(__input)
12869        };
12870        let mut __struct = Self::default();
12871        for v in &mut __struct.q {
12872            let val = buf.get_f32_le()?;
12873            *v = val;
12874        }
12875        __struct.angular_velocity_x = buf.get_f32_le()?;
12876        __struct.angular_velocity_y = buf.get_f32_le()?;
12877        __struct.angular_velocity_z = buf.get_f32_le()?;
12878        let tmp = buf.get_u16_le()?;
12879        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12880            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12881                flag_type: "GimbalDeviceFlags",
12882                value: tmp as u64,
12883            })?;
12884        __struct.target_system = buf.get_u8()?;
12885        __struct.target_component = buf.get_u8()?;
12886        Ok(__struct)
12887    }
12888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12889        let mut __tmp = BytesMut::new(bytes);
12890        #[allow(clippy::absurd_extreme_comparisons)]
12891        #[allow(unused_comparisons)]
12892        if __tmp.remaining() < Self::ENCODED_LEN {
12893            panic!(
12894                "buffer is too small (need {} bytes, but got {})",
12895                Self::ENCODED_LEN,
12896                __tmp.remaining(),
12897            )
12898        }
12899        for val in &self.q {
12900            __tmp.put_f32_le(*val);
12901        }
12902        __tmp.put_f32_le(self.angular_velocity_x);
12903        __tmp.put_f32_le(self.angular_velocity_y);
12904        __tmp.put_f32_le(self.angular_velocity_z);
12905        __tmp.put_u16_le(self.flags.bits() as u16);
12906        __tmp.put_u8(self.target_system);
12907        __tmp.put_u8(self.target_component);
12908        if matches!(version, MavlinkVersion::V2) {
12909            let len = __tmp.len();
12910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12911        } else {
12912            __tmp.len()
12913        }
12914    }
12915}
12916#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12917#[doc = ""]
12918#[doc = "ID: 280"]
12919#[derive(Debug, Clone, PartialEq)]
12920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12922#[cfg_attr(feature = "ts", derive(TS))]
12923#[cfg_attr(feature = "ts", ts(export))]
12924pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12925    #[doc = "Timestamp (time since system boot)."]
12926    pub time_boot_ms: u32,
12927    #[doc = "Bitmap of gimbal capability flags."]
12928    pub cap_flags: GimbalManagerCapFlags,
12929    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12930    pub roll_min: f32,
12931    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12932    pub roll_max: f32,
12933    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12934    pub pitch_min: f32,
12935    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12936    pub pitch_max: f32,
12937    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12938    pub yaw_min: f32,
12939    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12940    pub yaw_max: f32,
12941    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12942    pub gimbal_device_id: u8,
12943}
12944impl GIMBAL_MANAGER_INFORMATION_DATA {
12945    pub const ENCODED_LEN: usize = 33usize;
12946    pub const DEFAULT: Self = Self {
12947        time_boot_ms: 0_u32,
12948        cap_flags: GimbalManagerCapFlags::DEFAULT,
12949        roll_min: 0.0_f32,
12950        roll_max: 0.0_f32,
12951        pitch_min: 0.0_f32,
12952        pitch_max: 0.0_f32,
12953        yaw_min: 0.0_f32,
12954        yaw_max: 0.0_f32,
12955        gimbal_device_id: 0_u8,
12956    };
12957    #[cfg(feature = "arbitrary")]
12958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12959        use arbitrary::{Arbitrary, Unstructured};
12960        let mut buf = [0u8; 1024];
12961        rng.fill_bytes(&mut buf);
12962        let mut unstructured = Unstructured::new(&buf);
12963        Self::arbitrary(&mut unstructured).unwrap_or_default()
12964    }
12965}
12966impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12967    fn default() -> Self {
12968        Self::DEFAULT.clone()
12969    }
12970}
12971impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12972    type Message = MavMessage;
12973    const ID: u32 = 280u32;
12974    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12975    const EXTRA_CRC: u8 = 70u8;
12976    const ENCODED_LEN: usize = 33usize;
12977    fn deser(
12978        _version: MavlinkVersion,
12979        __input: &[u8],
12980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12981        let avail_len = __input.len();
12982        let mut payload_buf = [0; Self::ENCODED_LEN];
12983        let mut buf = if avail_len < Self::ENCODED_LEN {
12984            payload_buf[0..avail_len].copy_from_slice(__input);
12985            Bytes::new(&payload_buf)
12986        } else {
12987            Bytes::new(__input)
12988        };
12989        let mut __struct = Self::default();
12990        __struct.time_boot_ms = buf.get_u32_le()?;
12991        let tmp = buf.get_u32_le()?;
12992        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12993            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12994        )
12995        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12996            flag_type: "GimbalManagerCapFlags",
12997            value: tmp as u64,
12998        })?;
12999        __struct.roll_min = buf.get_f32_le()?;
13000        __struct.roll_max = buf.get_f32_le()?;
13001        __struct.pitch_min = buf.get_f32_le()?;
13002        __struct.pitch_max = buf.get_f32_le()?;
13003        __struct.yaw_min = buf.get_f32_le()?;
13004        __struct.yaw_max = buf.get_f32_le()?;
13005        __struct.gimbal_device_id = buf.get_u8()?;
13006        Ok(__struct)
13007    }
13008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13009        let mut __tmp = BytesMut::new(bytes);
13010        #[allow(clippy::absurd_extreme_comparisons)]
13011        #[allow(unused_comparisons)]
13012        if __tmp.remaining() < Self::ENCODED_LEN {
13013            panic!(
13014                "buffer is too small (need {} bytes, but got {})",
13015                Self::ENCODED_LEN,
13016                __tmp.remaining(),
13017            )
13018        }
13019        __tmp.put_u32_le(self.time_boot_ms);
13020        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13021        __tmp.put_f32_le(self.roll_min);
13022        __tmp.put_f32_le(self.roll_max);
13023        __tmp.put_f32_le(self.pitch_min);
13024        __tmp.put_f32_le(self.pitch_max);
13025        __tmp.put_f32_le(self.yaw_min);
13026        __tmp.put_f32_le(self.yaw_max);
13027        __tmp.put_u8(self.gimbal_device_id);
13028        if matches!(version, MavlinkVersion::V2) {
13029            let len = __tmp.len();
13030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13031        } else {
13032            __tmp.len()
13033        }
13034    }
13035}
13036#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13037#[doc = ""]
13038#[doc = "ID: 282"]
13039#[derive(Debug, Clone, PartialEq)]
13040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13042#[cfg_attr(feature = "ts", derive(TS))]
13043#[cfg_attr(feature = "ts", ts(export))]
13044pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13045    #[doc = "High level gimbal manager flags to use."]
13046    pub flags: GimbalManagerFlags,
13047    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13050    pub q: [f32; 4],
13051    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13052    pub angular_velocity_x: f32,
13053    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13054    pub angular_velocity_y: f32,
13055    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13056    pub angular_velocity_z: f32,
13057    #[doc = "System ID"]
13058    pub target_system: u8,
13059    #[doc = "Component ID"]
13060    pub target_component: u8,
13061    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13062    pub gimbal_device_id: u8,
13063}
13064impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13065    pub const ENCODED_LEN: usize = 35usize;
13066    pub const DEFAULT: Self = Self {
13067        flags: GimbalManagerFlags::DEFAULT,
13068        q: [0.0_f32; 4usize],
13069        angular_velocity_x: 0.0_f32,
13070        angular_velocity_y: 0.0_f32,
13071        angular_velocity_z: 0.0_f32,
13072        target_system: 0_u8,
13073        target_component: 0_u8,
13074        gimbal_device_id: 0_u8,
13075    };
13076    #[cfg(feature = "arbitrary")]
13077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13078        use arbitrary::{Arbitrary, Unstructured};
13079        let mut buf = [0u8; 1024];
13080        rng.fill_bytes(&mut buf);
13081        let mut unstructured = Unstructured::new(&buf);
13082        Self::arbitrary(&mut unstructured).unwrap_or_default()
13083    }
13084}
13085impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13086    fn default() -> Self {
13087        Self::DEFAULT.clone()
13088    }
13089}
13090impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13091    type Message = MavMessage;
13092    const ID: u32 = 282u32;
13093    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13094    const EXTRA_CRC: u8 = 123u8;
13095    const ENCODED_LEN: usize = 35usize;
13096    fn deser(
13097        _version: MavlinkVersion,
13098        __input: &[u8],
13099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13100        let avail_len = __input.len();
13101        let mut payload_buf = [0; Self::ENCODED_LEN];
13102        let mut buf = if avail_len < Self::ENCODED_LEN {
13103            payload_buf[0..avail_len].copy_from_slice(__input);
13104            Bytes::new(&payload_buf)
13105        } else {
13106            Bytes::new(__input)
13107        };
13108        let mut __struct = Self::default();
13109        let tmp = buf.get_u32_le()?;
13110        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13111            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13112                flag_type: "GimbalManagerFlags",
13113                value: tmp as u64,
13114            })?;
13115        for v in &mut __struct.q {
13116            let val = buf.get_f32_le()?;
13117            *v = val;
13118        }
13119        __struct.angular_velocity_x = buf.get_f32_le()?;
13120        __struct.angular_velocity_y = buf.get_f32_le()?;
13121        __struct.angular_velocity_z = buf.get_f32_le()?;
13122        __struct.target_system = buf.get_u8()?;
13123        __struct.target_component = buf.get_u8()?;
13124        __struct.gimbal_device_id = buf.get_u8()?;
13125        Ok(__struct)
13126    }
13127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13128        let mut __tmp = BytesMut::new(bytes);
13129        #[allow(clippy::absurd_extreme_comparisons)]
13130        #[allow(unused_comparisons)]
13131        if __tmp.remaining() < Self::ENCODED_LEN {
13132            panic!(
13133                "buffer is too small (need {} bytes, but got {})",
13134                Self::ENCODED_LEN,
13135                __tmp.remaining(),
13136            )
13137        }
13138        __tmp.put_u32_le(self.flags.bits() as u32);
13139        for val in &self.q {
13140            __tmp.put_f32_le(*val);
13141        }
13142        __tmp.put_f32_le(self.angular_velocity_x);
13143        __tmp.put_f32_le(self.angular_velocity_y);
13144        __tmp.put_f32_le(self.angular_velocity_z);
13145        __tmp.put_u8(self.target_system);
13146        __tmp.put_u8(self.target_component);
13147        __tmp.put_u8(self.gimbal_device_id);
13148        if matches!(version, MavlinkVersion::V2) {
13149            let len = __tmp.len();
13150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13151        } else {
13152            __tmp.len()
13153        }
13154    }
13155}
13156#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13157#[doc = ""]
13158#[doc = "ID: 288"]
13159#[derive(Debug, Clone, PartialEq)]
13160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13162#[cfg_attr(feature = "ts", derive(TS))]
13163#[cfg_attr(feature = "ts", ts(export))]
13164pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13165    #[doc = "High level gimbal manager flags."]
13166    pub flags: GimbalManagerFlags,
13167    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13168    pub pitch: f32,
13169    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13170    pub yaw: f32,
13171    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13172    pub pitch_rate: f32,
13173    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13174    pub yaw_rate: f32,
13175    #[doc = "System ID"]
13176    pub target_system: u8,
13177    #[doc = "Component ID"]
13178    pub target_component: u8,
13179    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13180    pub gimbal_device_id: u8,
13181}
13182impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13183    pub const ENCODED_LEN: usize = 23usize;
13184    pub const DEFAULT: Self = Self {
13185        flags: GimbalManagerFlags::DEFAULT,
13186        pitch: 0.0_f32,
13187        yaw: 0.0_f32,
13188        pitch_rate: 0.0_f32,
13189        yaw_rate: 0.0_f32,
13190        target_system: 0_u8,
13191        target_component: 0_u8,
13192        gimbal_device_id: 0_u8,
13193    };
13194    #[cfg(feature = "arbitrary")]
13195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13196        use arbitrary::{Arbitrary, Unstructured};
13197        let mut buf = [0u8; 1024];
13198        rng.fill_bytes(&mut buf);
13199        let mut unstructured = Unstructured::new(&buf);
13200        Self::arbitrary(&mut unstructured).unwrap_or_default()
13201    }
13202}
13203impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13204    fn default() -> Self {
13205        Self::DEFAULT.clone()
13206    }
13207}
13208impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13209    type Message = MavMessage;
13210    const ID: u32 = 288u32;
13211    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13212    const EXTRA_CRC: u8 = 20u8;
13213    const ENCODED_LEN: usize = 23usize;
13214    fn deser(
13215        _version: MavlinkVersion,
13216        __input: &[u8],
13217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13218        let avail_len = __input.len();
13219        let mut payload_buf = [0; Self::ENCODED_LEN];
13220        let mut buf = if avail_len < Self::ENCODED_LEN {
13221            payload_buf[0..avail_len].copy_from_slice(__input);
13222            Bytes::new(&payload_buf)
13223        } else {
13224            Bytes::new(__input)
13225        };
13226        let mut __struct = Self::default();
13227        let tmp = buf.get_u32_le()?;
13228        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13229            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13230                flag_type: "GimbalManagerFlags",
13231                value: tmp as u64,
13232            })?;
13233        __struct.pitch = buf.get_f32_le()?;
13234        __struct.yaw = buf.get_f32_le()?;
13235        __struct.pitch_rate = buf.get_f32_le()?;
13236        __struct.yaw_rate = buf.get_f32_le()?;
13237        __struct.target_system = buf.get_u8()?;
13238        __struct.target_component = buf.get_u8()?;
13239        __struct.gimbal_device_id = buf.get_u8()?;
13240        Ok(__struct)
13241    }
13242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13243        let mut __tmp = BytesMut::new(bytes);
13244        #[allow(clippy::absurd_extreme_comparisons)]
13245        #[allow(unused_comparisons)]
13246        if __tmp.remaining() < Self::ENCODED_LEN {
13247            panic!(
13248                "buffer is too small (need {} bytes, but got {})",
13249                Self::ENCODED_LEN,
13250                __tmp.remaining(),
13251            )
13252        }
13253        __tmp.put_u32_le(self.flags.bits() as u32);
13254        __tmp.put_f32_le(self.pitch);
13255        __tmp.put_f32_le(self.yaw);
13256        __tmp.put_f32_le(self.pitch_rate);
13257        __tmp.put_f32_le(self.yaw_rate);
13258        __tmp.put_u8(self.target_system);
13259        __tmp.put_u8(self.target_component);
13260        __tmp.put_u8(self.gimbal_device_id);
13261        if matches!(version, MavlinkVersion::V2) {
13262            let len = __tmp.len();
13263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13264        } else {
13265            __tmp.len()
13266        }
13267    }
13268}
13269#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13270#[doc = ""]
13271#[doc = "ID: 287"]
13272#[derive(Debug, Clone, PartialEq)]
13273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13275#[cfg_attr(feature = "ts", derive(TS))]
13276#[cfg_attr(feature = "ts", ts(export))]
13277pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13278    #[doc = "High level gimbal manager flags to use."]
13279    pub flags: GimbalManagerFlags,
13280    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13281    pub pitch: f32,
13282    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13283    pub yaw: f32,
13284    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13285    pub pitch_rate: f32,
13286    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13287    pub yaw_rate: f32,
13288    #[doc = "System ID"]
13289    pub target_system: u8,
13290    #[doc = "Component ID"]
13291    pub target_component: u8,
13292    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13293    pub gimbal_device_id: u8,
13294}
13295impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13296    pub const ENCODED_LEN: usize = 23usize;
13297    pub const DEFAULT: Self = Self {
13298        flags: GimbalManagerFlags::DEFAULT,
13299        pitch: 0.0_f32,
13300        yaw: 0.0_f32,
13301        pitch_rate: 0.0_f32,
13302        yaw_rate: 0.0_f32,
13303        target_system: 0_u8,
13304        target_component: 0_u8,
13305        gimbal_device_id: 0_u8,
13306    };
13307    #[cfg(feature = "arbitrary")]
13308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13309        use arbitrary::{Arbitrary, Unstructured};
13310        let mut buf = [0u8; 1024];
13311        rng.fill_bytes(&mut buf);
13312        let mut unstructured = Unstructured::new(&buf);
13313        Self::arbitrary(&mut unstructured).unwrap_or_default()
13314    }
13315}
13316impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13317    fn default() -> Self {
13318        Self::DEFAULT.clone()
13319    }
13320}
13321impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13322    type Message = MavMessage;
13323    const ID: u32 = 287u32;
13324    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13325    const EXTRA_CRC: u8 = 1u8;
13326    const ENCODED_LEN: usize = 23usize;
13327    fn deser(
13328        _version: MavlinkVersion,
13329        __input: &[u8],
13330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13331        let avail_len = __input.len();
13332        let mut payload_buf = [0; Self::ENCODED_LEN];
13333        let mut buf = if avail_len < Self::ENCODED_LEN {
13334            payload_buf[0..avail_len].copy_from_slice(__input);
13335            Bytes::new(&payload_buf)
13336        } else {
13337            Bytes::new(__input)
13338        };
13339        let mut __struct = Self::default();
13340        let tmp = buf.get_u32_le()?;
13341        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13342            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13343                flag_type: "GimbalManagerFlags",
13344                value: tmp as u64,
13345            })?;
13346        __struct.pitch = buf.get_f32_le()?;
13347        __struct.yaw = buf.get_f32_le()?;
13348        __struct.pitch_rate = buf.get_f32_le()?;
13349        __struct.yaw_rate = buf.get_f32_le()?;
13350        __struct.target_system = buf.get_u8()?;
13351        __struct.target_component = buf.get_u8()?;
13352        __struct.gimbal_device_id = buf.get_u8()?;
13353        Ok(__struct)
13354    }
13355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13356        let mut __tmp = BytesMut::new(bytes);
13357        #[allow(clippy::absurd_extreme_comparisons)]
13358        #[allow(unused_comparisons)]
13359        if __tmp.remaining() < Self::ENCODED_LEN {
13360            panic!(
13361                "buffer is too small (need {} bytes, but got {})",
13362                Self::ENCODED_LEN,
13363                __tmp.remaining(),
13364            )
13365        }
13366        __tmp.put_u32_le(self.flags.bits() as u32);
13367        __tmp.put_f32_le(self.pitch);
13368        __tmp.put_f32_le(self.yaw);
13369        __tmp.put_f32_le(self.pitch_rate);
13370        __tmp.put_f32_le(self.yaw_rate);
13371        __tmp.put_u8(self.target_system);
13372        __tmp.put_u8(self.target_component);
13373        __tmp.put_u8(self.gimbal_device_id);
13374        if matches!(version, MavlinkVersion::V2) {
13375            let len = __tmp.len();
13376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13377        } else {
13378            __tmp.len()
13379        }
13380    }
13381}
13382#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13383#[doc = ""]
13384#[doc = "ID: 281"]
13385#[derive(Debug, Clone, PartialEq)]
13386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13388#[cfg_attr(feature = "ts", derive(TS))]
13389#[cfg_attr(feature = "ts", ts(export))]
13390pub struct GIMBAL_MANAGER_STATUS_DATA {
13391    #[doc = "Timestamp (time since system boot)."]
13392    pub time_boot_ms: u32,
13393    #[doc = "High level gimbal manager flags currently applied."]
13394    pub flags: GimbalManagerFlags,
13395    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13396    pub gimbal_device_id: u8,
13397    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13398    pub primary_control_sysid: u8,
13399    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13400    pub primary_control_compid: u8,
13401    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13402    pub secondary_control_sysid: u8,
13403    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13404    pub secondary_control_compid: u8,
13405}
13406impl GIMBAL_MANAGER_STATUS_DATA {
13407    pub const ENCODED_LEN: usize = 13usize;
13408    pub const DEFAULT: Self = Self {
13409        time_boot_ms: 0_u32,
13410        flags: GimbalManagerFlags::DEFAULT,
13411        gimbal_device_id: 0_u8,
13412        primary_control_sysid: 0_u8,
13413        primary_control_compid: 0_u8,
13414        secondary_control_sysid: 0_u8,
13415        secondary_control_compid: 0_u8,
13416    };
13417    #[cfg(feature = "arbitrary")]
13418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13419        use arbitrary::{Arbitrary, Unstructured};
13420        let mut buf = [0u8; 1024];
13421        rng.fill_bytes(&mut buf);
13422        let mut unstructured = Unstructured::new(&buf);
13423        Self::arbitrary(&mut unstructured).unwrap_or_default()
13424    }
13425}
13426impl Default for GIMBAL_MANAGER_STATUS_DATA {
13427    fn default() -> Self {
13428        Self::DEFAULT.clone()
13429    }
13430}
13431impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13432    type Message = MavMessage;
13433    const ID: u32 = 281u32;
13434    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13435    const EXTRA_CRC: u8 = 48u8;
13436    const ENCODED_LEN: usize = 13usize;
13437    fn deser(
13438        _version: MavlinkVersion,
13439        __input: &[u8],
13440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13441        let avail_len = __input.len();
13442        let mut payload_buf = [0; Self::ENCODED_LEN];
13443        let mut buf = if avail_len < Self::ENCODED_LEN {
13444            payload_buf[0..avail_len].copy_from_slice(__input);
13445            Bytes::new(&payload_buf)
13446        } else {
13447            Bytes::new(__input)
13448        };
13449        let mut __struct = Self::default();
13450        __struct.time_boot_ms = buf.get_u32_le()?;
13451        let tmp = buf.get_u32_le()?;
13452        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13453            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13454                flag_type: "GimbalManagerFlags",
13455                value: tmp as u64,
13456            })?;
13457        __struct.gimbal_device_id = buf.get_u8()?;
13458        __struct.primary_control_sysid = buf.get_u8()?;
13459        __struct.primary_control_compid = buf.get_u8()?;
13460        __struct.secondary_control_sysid = buf.get_u8()?;
13461        __struct.secondary_control_compid = buf.get_u8()?;
13462        Ok(__struct)
13463    }
13464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13465        let mut __tmp = BytesMut::new(bytes);
13466        #[allow(clippy::absurd_extreme_comparisons)]
13467        #[allow(unused_comparisons)]
13468        if __tmp.remaining() < Self::ENCODED_LEN {
13469            panic!(
13470                "buffer is too small (need {} bytes, but got {})",
13471                Self::ENCODED_LEN,
13472                __tmp.remaining(),
13473            )
13474        }
13475        __tmp.put_u32_le(self.time_boot_ms);
13476        __tmp.put_u32_le(self.flags.bits() as u32);
13477        __tmp.put_u8(self.gimbal_device_id);
13478        __tmp.put_u8(self.primary_control_sysid);
13479        __tmp.put_u8(self.primary_control_compid);
13480        __tmp.put_u8(self.secondary_control_sysid);
13481        __tmp.put_u8(self.secondary_control_compid);
13482        if matches!(version, MavlinkVersion::V2) {
13483            let len = __tmp.len();
13484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13485        } else {
13486            __tmp.len()
13487        }
13488    }
13489}
13490#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13491#[doc = ""]
13492#[doc = "ID: 33"]
13493#[derive(Debug, Clone, PartialEq)]
13494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13496#[cfg_attr(feature = "ts", derive(TS))]
13497#[cfg_attr(feature = "ts", ts(export))]
13498pub struct GLOBAL_POSITION_INT_DATA {
13499    #[doc = "Timestamp (time since system boot)."]
13500    pub time_boot_ms: u32,
13501    #[doc = "Latitude, expressed"]
13502    pub lat: i32,
13503    #[doc = "Longitude, expressed"]
13504    pub lon: i32,
13505    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13506    pub alt: i32,
13507    #[doc = "Altitude above home"]
13508    pub relative_alt: i32,
13509    #[doc = "Ground X Speed (Latitude, positive north)"]
13510    pub vx: i16,
13511    #[doc = "Ground Y Speed (Longitude, positive east)"]
13512    pub vy: i16,
13513    #[doc = "Ground Z Speed (Altitude, positive down)"]
13514    pub vz: i16,
13515    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13516    pub hdg: u16,
13517}
13518impl GLOBAL_POSITION_INT_DATA {
13519    pub const ENCODED_LEN: usize = 28usize;
13520    pub const DEFAULT: Self = Self {
13521        time_boot_ms: 0_u32,
13522        lat: 0_i32,
13523        lon: 0_i32,
13524        alt: 0_i32,
13525        relative_alt: 0_i32,
13526        vx: 0_i16,
13527        vy: 0_i16,
13528        vz: 0_i16,
13529        hdg: 0_u16,
13530    };
13531    #[cfg(feature = "arbitrary")]
13532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13533        use arbitrary::{Arbitrary, Unstructured};
13534        let mut buf = [0u8; 1024];
13535        rng.fill_bytes(&mut buf);
13536        let mut unstructured = Unstructured::new(&buf);
13537        Self::arbitrary(&mut unstructured).unwrap_or_default()
13538    }
13539}
13540impl Default for GLOBAL_POSITION_INT_DATA {
13541    fn default() -> Self {
13542        Self::DEFAULT.clone()
13543    }
13544}
13545impl MessageData for GLOBAL_POSITION_INT_DATA {
13546    type Message = MavMessage;
13547    const ID: u32 = 33u32;
13548    const NAME: &'static str = "GLOBAL_POSITION_INT";
13549    const EXTRA_CRC: u8 = 104u8;
13550    const ENCODED_LEN: usize = 28usize;
13551    fn deser(
13552        _version: MavlinkVersion,
13553        __input: &[u8],
13554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13555        let avail_len = __input.len();
13556        let mut payload_buf = [0; Self::ENCODED_LEN];
13557        let mut buf = if avail_len < Self::ENCODED_LEN {
13558            payload_buf[0..avail_len].copy_from_slice(__input);
13559            Bytes::new(&payload_buf)
13560        } else {
13561            Bytes::new(__input)
13562        };
13563        let mut __struct = Self::default();
13564        __struct.time_boot_ms = buf.get_u32_le()?;
13565        __struct.lat = buf.get_i32_le()?;
13566        __struct.lon = buf.get_i32_le()?;
13567        __struct.alt = buf.get_i32_le()?;
13568        __struct.relative_alt = buf.get_i32_le()?;
13569        __struct.vx = buf.get_i16_le()?;
13570        __struct.vy = buf.get_i16_le()?;
13571        __struct.vz = buf.get_i16_le()?;
13572        __struct.hdg = buf.get_u16_le()?;
13573        Ok(__struct)
13574    }
13575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13576        let mut __tmp = BytesMut::new(bytes);
13577        #[allow(clippy::absurd_extreme_comparisons)]
13578        #[allow(unused_comparisons)]
13579        if __tmp.remaining() < Self::ENCODED_LEN {
13580            panic!(
13581                "buffer is too small (need {} bytes, but got {})",
13582                Self::ENCODED_LEN,
13583                __tmp.remaining(),
13584            )
13585        }
13586        __tmp.put_u32_le(self.time_boot_ms);
13587        __tmp.put_i32_le(self.lat);
13588        __tmp.put_i32_le(self.lon);
13589        __tmp.put_i32_le(self.alt);
13590        __tmp.put_i32_le(self.relative_alt);
13591        __tmp.put_i16_le(self.vx);
13592        __tmp.put_i16_le(self.vy);
13593        __tmp.put_i16_le(self.vz);
13594        __tmp.put_u16_le(self.hdg);
13595        if matches!(version, MavlinkVersion::V2) {
13596            let len = __tmp.len();
13597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13598        } else {
13599            __tmp.len()
13600        }
13601    }
13602}
13603#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13604#[doc = ""]
13605#[doc = "ID: 63"]
13606#[derive(Debug, Clone, PartialEq)]
13607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13609#[cfg_attr(feature = "ts", derive(TS))]
13610#[cfg_attr(feature = "ts", ts(export))]
13611pub struct GLOBAL_POSITION_INT_COV_DATA {
13612    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13613    pub time_usec: u64,
13614    #[doc = "Latitude"]
13615    pub lat: i32,
13616    #[doc = "Longitude"]
13617    pub lon: i32,
13618    #[doc = "Altitude in meters above MSL"]
13619    pub alt: i32,
13620    #[doc = "Altitude above ground"]
13621    pub relative_alt: i32,
13622    #[doc = "Ground X Speed (Latitude)"]
13623    pub vx: f32,
13624    #[doc = "Ground Y Speed (Longitude)"]
13625    pub vy: f32,
13626    #[doc = "Ground Z Speed (Altitude)"]
13627    pub vz: f32,
13628    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13630    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13631    pub covariance: [f32; 36],
13632    #[doc = "Class id of the estimator this estimate originated from."]
13633    pub estimator_type: MavEstimatorType,
13634}
13635impl GLOBAL_POSITION_INT_COV_DATA {
13636    pub const ENCODED_LEN: usize = 181usize;
13637    pub const DEFAULT: Self = Self {
13638        time_usec: 0_u64,
13639        lat: 0_i32,
13640        lon: 0_i32,
13641        alt: 0_i32,
13642        relative_alt: 0_i32,
13643        vx: 0.0_f32,
13644        vy: 0.0_f32,
13645        vz: 0.0_f32,
13646        covariance: [0.0_f32; 36usize],
13647        estimator_type: MavEstimatorType::DEFAULT,
13648    };
13649    #[cfg(feature = "arbitrary")]
13650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13651        use arbitrary::{Arbitrary, Unstructured};
13652        let mut buf = [0u8; 1024];
13653        rng.fill_bytes(&mut buf);
13654        let mut unstructured = Unstructured::new(&buf);
13655        Self::arbitrary(&mut unstructured).unwrap_or_default()
13656    }
13657}
13658impl Default for GLOBAL_POSITION_INT_COV_DATA {
13659    fn default() -> Self {
13660        Self::DEFAULT.clone()
13661    }
13662}
13663impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13664    type Message = MavMessage;
13665    const ID: u32 = 63u32;
13666    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13667    const EXTRA_CRC: u8 = 119u8;
13668    const ENCODED_LEN: usize = 181usize;
13669    fn deser(
13670        _version: MavlinkVersion,
13671        __input: &[u8],
13672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13673        let avail_len = __input.len();
13674        let mut payload_buf = [0; Self::ENCODED_LEN];
13675        let mut buf = if avail_len < Self::ENCODED_LEN {
13676            payload_buf[0..avail_len].copy_from_slice(__input);
13677            Bytes::new(&payload_buf)
13678        } else {
13679            Bytes::new(__input)
13680        };
13681        let mut __struct = Self::default();
13682        __struct.time_usec = buf.get_u64_le()?;
13683        __struct.lat = buf.get_i32_le()?;
13684        __struct.lon = buf.get_i32_le()?;
13685        __struct.alt = buf.get_i32_le()?;
13686        __struct.relative_alt = buf.get_i32_le()?;
13687        __struct.vx = buf.get_f32_le()?;
13688        __struct.vy = buf.get_f32_le()?;
13689        __struct.vz = buf.get_f32_le()?;
13690        for v in &mut __struct.covariance {
13691            let val = buf.get_f32_le()?;
13692            *v = val;
13693        }
13694        let tmp = buf.get_u8()?;
13695        __struct.estimator_type =
13696            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13697                enum_type: "MavEstimatorType",
13698                value: tmp as u64,
13699            })?;
13700        Ok(__struct)
13701    }
13702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13703        let mut __tmp = BytesMut::new(bytes);
13704        #[allow(clippy::absurd_extreme_comparisons)]
13705        #[allow(unused_comparisons)]
13706        if __tmp.remaining() < Self::ENCODED_LEN {
13707            panic!(
13708                "buffer is too small (need {} bytes, but got {})",
13709                Self::ENCODED_LEN,
13710                __tmp.remaining(),
13711            )
13712        }
13713        __tmp.put_u64_le(self.time_usec);
13714        __tmp.put_i32_le(self.lat);
13715        __tmp.put_i32_le(self.lon);
13716        __tmp.put_i32_le(self.alt);
13717        __tmp.put_i32_le(self.relative_alt);
13718        __tmp.put_f32_le(self.vx);
13719        __tmp.put_f32_le(self.vy);
13720        __tmp.put_f32_le(self.vz);
13721        for val in &self.covariance {
13722            __tmp.put_f32_le(*val);
13723        }
13724        __tmp.put_u8(self.estimator_type as u8);
13725        if matches!(version, MavlinkVersion::V2) {
13726            let len = __tmp.len();
13727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13728        } else {
13729            __tmp.len()
13730        }
13731    }
13732}
13733#[doc = "Global position/attitude estimate from a vision source."]
13734#[doc = ""]
13735#[doc = "ID: 101"]
13736#[derive(Debug, Clone, PartialEq)]
13737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13739#[cfg_attr(feature = "ts", derive(TS))]
13740#[cfg_attr(feature = "ts", ts(export))]
13741pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13742    #[doc = "Timestamp (UNIX time or since system boot)"]
13743    pub usec: u64,
13744    #[doc = "Global X position"]
13745    pub x: f32,
13746    #[doc = "Global Y position"]
13747    pub y: f32,
13748    #[doc = "Global Z position"]
13749    pub z: f32,
13750    #[doc = "Roll angle"]
13751    pub roll: f32,
13752    #[doc = "Pitch angle"]
13753    pub pitch: f32,
13754    #[doc = "Yaw angle"]
13755    pub yaw: f32,
13756    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13757    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13760    pub covariance: [f32; 21],
13761    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13763    pub reset_counter: u8,
13764}
13765impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13766    pub const ENCODED_LEN: usize = 117usize;
13767    pub const DEFAULT: Self = Self {
13768        usec: 0_u64,
13769        x: 0.0_f32,
13770        y: 0.0_f32,
13771        z: 0.0_f32,
13772        roll: 0.0_f32,
13773        pitch: 0.0_f32,
13774        yaw: 0.0_f32,
13775        covariance: [0.0_f32; 21usize],
13776        reset_counter: 0_u8,
13777    };
13778    #[cfg(feature = "arbitrary")]
13779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13780        use arbitrary::{Arbitrary, Unstructured};
13781        let mut buf = [0u8; 1024];
13782        rng.fill_bytes(&mut buf);
13783        let mut unstructured = Unstructured::new(&buf);
13784        Self::arbitrary(&mut unstructured).unwrap_or_default()
13785    }
13786}
13787impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13788    fn default() -> Self {
13789        Self::DEFAULT.clone()
13790    }
13791}
13792impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13793    type Message = MavMessage;
13794    const ID: u32 = 101u32;
13795    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13796    const EXTRA_CRC: u8 = 102u8;
13797    const ENCODED_LEN: usize = 117usize;
13798    fn deser(
13799        _version: MavlinkVersion,
13800        __input: &[u8],
13801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13802        let avail_len = __input.len();
13803        let mut payload_buf = [0; Self::ENCODED_LEN];
13804        let mut buf = if avail_len < Self::ENCODED_LEN {
13805            payload_buf[0..avail_len].copy_from_slice(__input);
13806            Bytes::new(&payload_buf)
13807        } else {
13808            Bytes::new(__input)
13809        };
13810        let mut __struct = Self::default();
13811        __struct.usec = buf.get_u64_le()?;
13812        __struct.x = buf.get_f32_le()?;
13813        __struct.y = buf.get_f32_le()?;
13814        __struct.z = buf.get_f32_le()?;
13815        __struct.roll = buf.get_f32_le()?;
13816        __struct.pitch = buf.get_f32_le()?;
13817        __struct.yaw = buf.get_f32_le()?;
13818        for v in &mut __struct.covariance {
13819            let val = buf.get_f32_le()?;
13820            *v = val;
13821        }
13822        __struct.reset_counter = buf.get_u8()?;
13823        Ok(__struct)
13824    }
13825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13826        let mut __tmp = BytesMut::new(bytes);
13827        #[allow(clippy::absurd_extreme_comparisons)]
13828        #[allow(unused_comparisons)]
13829        if __tmp.remaining() < Self::ENCODED_LEN {
13830            panic!(
13831                "buffer is too small (need {} bytes, but got {})",
13832                Self::ENCODED_LEN,
13833                __tmp.remaining(),
13834            )
13835        }
13836        __tmp.put_u64_le(self.usec);
13837        __tmp.put_f32_le(self.x);
13838        __tmp.put_f32_le(self.y);
13839        __tmp.put_f32_le(self.z);
13840        __tmp.put_f32_le(self.roll);
13841        __tmp.put_f32_le(self.pitch);
13842        __tmp.put_f32_le(self.yaw);
13843        if matches!(version, MavlinkVersion::V2) {
13844            for val in &self.covariance {
13845                __tmp.put_f32_le(*val);
13846            }
13847            __tmp.put_u8(self.reset_counter);
13848            let len = __tmp.len();
13849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13850        } else {
13851            __tmp.len()
13852        }
13853    }
13854}
13855#[doc = "Second GPS data."]
13856#[doc = ""]
13857#[doc = "ID: 124"]
13858#[derive(Debug, Clone, PartialEq)]
13859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13861#[cfg_attr(feature = "ts", derive(TS))]
13862#[cfg_attr(feature = "ts", ts(export))]
13863pub struct GPS2_RAW_DATA {
13864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13865    pub time_usec: u64,
13866    #[doc = "Latitude (WGS84)"]
13867    pub lat: i32,
13868    #[doc = "Longitude (WGS84)"]
13869    pub lon: i32,
13870    #[doc = "Altitude (MSL). Positive for up."]
13871    pub alt: i32,
13872    #[doc = "Age of DGPS info"]
13873    pub dgps_age: u32,
13874    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13875    pub eph: u16,
13876    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13877    pub epv: u16,
13878    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13879    pub vel: u16,
13880    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13881    pub cog: u16,
13882    #[doc = "GPS fix type."]
13883    pub fix_type: GpsFixType,
13884    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13885    pub satellites_visible: u8,
13886    #[doc = "Number of DGPS satellites"]
13887    pub dgps_numch: u8,
13888    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13890    pub yaw: u16,
13891    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13892    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13893    pub alt_ellipsoid: i32,
13894    #[doc = "Position uncertainty."]
13895    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13896    pub h_acc: u32,
13897    #[doc = "Altitude uncertainty."]
13898    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13899    pub v_acc: u32,
13900    #[doc = "Speed uncertainty."]
13901    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13902    pub vel_acc: u32,
13903    #[doc = "Heading / track uncertainty"]
13904    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13905    pub hdg_acc: u32,
13906}
13907impl GPS2_RAW_DATA {
13908    pub const ENCODED_LEN: usize = 57usize;
13909    pub const DEFAULT: Self = Self {
13910        time_usec: 0_u64,
13911        lat: 0_i32,
13912        lon: 0_i32,
13913        alt: 0_i32,
13914        dgps_age: 0_u32,
13915        eph: 0_u16,
13916        epv: 0_u16,
13917        vel: 0_u16,
13918        cog: 0_u16,
13919        fix_type: GpsFixType::DEFAULT,
13920        satellites_visible: 0_u8,
13921        dgps_numch: 0_u8,
13922        yaw: 0_u16,
13923        alt_ellipsoid: 0_i32,
13924        h_acc: 0_u32,
13925        v_acc: 0_u32,
13926        vel_acc: 0_u32,
13927        hdg_acc: 0_u32,
13928    };
13929    #[cfg(feature = "arbitrary")]
13930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13931        use arbitrary::{Arbitrary, Unstructured};
13932        let mut buf = [0u8; 1024];
13933        rng.fill_bytes(&mut buf);
13934        let mut unstructured = Unstructured::new(&buf);
13935        Self::arbitrary(&mut unstructured).unwrap_or_default()
13936    }
13937}
13938impl Default for GPS2_RAW_DATA {
13939    fn default() -> Self {
13940        Self::DEFAULT.clone()
13941    }
13942}
13943impl MessageData for GPS2_RAW_DATA {
13944    type Message = MavMessage;
13945    const ID: u32 = 124u32;
13946    const NAME: &'static str = "GPS2_RAW";
13947    const EXTRA_CRC: u8 = 87u8;
13948    const ENCODED_LEN: usize = 57usize;
13949    fn deser(
13950        _version: MavlinkVersion,
13951        __input: &[u8],
13952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13953        let avail_len = __input.len();
13954        let mut payload_buf = [0; Self::ENCODED_LEN];
13955        let mut buf = if avail_len < Self::ENCODED_LEN {
13956            payload_buf[0..avail_len].copy_from_slice(__input);
13957            Bytes::new(&payload_buf)
13958        } else {
13959            Bytes::new(__input)
13960        };
13961        let mut __struct = Self::default();
13962        __struct.time_usec = buf.get_u64_le()?;
13963        __struct.lat = buf.get_i32_le()?;
13964        __struct.lon = buf.get_i32_le()?;
13965        __struct.alt = buf.get_i32_le()?;
13966        __struct.dgps_age = buf.get_u32_le()?;
13967        __struct.eph = buf.get_u16_le()?;
13968        __struct.epv = buf.get_u16_le()?;
13969        __struct.vel = buf.get_u16_le()?;
13970        __struct.cog = buf.get_u16_le()?;
13971        let tmp = buf.get_u8()?;
13972        __struct.fix_type =
13973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13974                enum_type: "GpsFixType",
13975                value: tmp as u64,
13976            })?;
13977        __struct.satellites_visible = buf.get_u8()?;
13978        __struct.dgps_numch = buf.get_u8()?;
13979        __struct.yaw = buf.get_u16_le()?;
13980        __struct.alt_ellipsoid = buf.get_i32_le()?;
13981        __struct.h_acc = buf.get_u32_le()?;
13982        __struct.v_acc = buf.get_u32_le()?;
13983        __struct.vel_acc = buf.get_u32_le()?;
13984        __struct.hdg_acc = buf.get_u32_le()?;
13985        Ok(__struct)
13986    }
13987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13988        let mut __tmp = BytesMut::new(bytes);
13989        #[allow(clippy::absurd_extreme_comparisons)]
13990        #[allow(unused_comparisons)]
13991        if __tmp.remaining() < Self::ENCODED_LEN {
13992            panic!(
13993                "buffer is too small (need {} bytes, but got {})",
13994                Self::ENCODED_LEN,
13995                __tmp.remaining(),
13996            )
13997        }
13998        __tmp.put_u64_le(self.time_usec);
13999        __tmp.put_i32_le(self.lat);
14000        __tmp.put_i32_le(self.lon);
14001        __tmp.put_i32_le(self.alt);
14002        __tmp.put_u32_le(self.dgps_age);
14003        __tmp.put_u16_le(self.eph);
14004        __tmp.put_u16_le(self.epv);
14005        __tmp.put_u16_le(self.vel);
14006        __tmp.put_u16_le(self.cog);
14007        __tmp.put_u8(self.fix_type as u8);
14008        __tmp.put_u8(self.satellites_visible);
14009        __tmp.put_u8(self.dgps_numch);
14010        if matches!(version, MavlinkVersion::V2) {
14011            __tmp.put_u16_le(self.yaw);
14012            __tmp.put_i32_le(self.alt_ellipsoid);
14013            __tmp.put_u32_le(self.h_acc);
14014            __tmp.put_u32_le(self.v_acc);
14015            __tmp.put_u32_le(self.vel_acc);
14016            __tmp.put_u32_le(self.hdg_acc);
14017            let len = __tmp.len();
14018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14019        } else {
14020            __tmp.len()
14021        }
14022    }
14023}
14024#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14025#[doc = ""]
14026#[doc = "ID: 128"]
14027#[derive(Debug, Clone, PartialEq)]
14028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14030#[cfg_attr(feature = "ts", derive(TS))]
14031#[cfg_attr(feature = "ts", ts(export))]
14032pub struct GPS2_RTK_DATA {
14033    #[doc = "Time since boot of last baseline message received."]
14034    pub time_last_baseline_ms: u32,
14035    #[doc = "GPS Time of Week of last baseline"]
14036    pub tow: u32,
14037    #[doc = "Current baseline in ECEF x or NED north component."]
14038    pub baseline_a_mm: i32,
14039    #[doc = "Current baseline in ECEF y or NED east component."]
14040    pub baseline_b_mm: i32,
14041    #[doc = "Current baseline in ECEF z or NED down component."]
14042    pub baseline_c_mm: i32,
14043    #[doc = "Current estimate of baseline accuracy."]
14044    pub accuracy: u32,
14045    #[doc = "Current number of integer ambiguity hypotheses."]
14046    pub iar_num_hypotheses: i32,
14047    #[doc = "GPS Week Number of last baseline"]
14048    pub wn: u16,
14049    #[doc = "Identification of connected RTK receiver."]
14050    pub rtk_receiver_id: u8,
14051    #[doc = "GPS-specific health report for RTK data."]
14052    pub rtk_health: u8,
14053    #[doc = "Rate of baseline messages being received by GPS"]
14054    pub rtk_rate: u8,
14055    #[doc = "Current number of sats used for RTK calculation."]
14056    pub nsats: u8,
14057    #[doc = "Coordinate system of baseline"]
14058    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14059}
14060impl GPS2_RTK_DATA {
14061    pub const ENCODED_LEN: usize = 35usize;
14062    pub const DEFAULT: Self = Self {
14063        time_last_baseline_ms: 0_u32,
14064        tow: 0_u32,
14065        baseline_a_mm: 0_i32,
14066        baseline_b_mm: 0_i32,
14067        baseline_c_mm: 0_i32,
14068        accuracy: 0_u32,
14069        iar_num_hypotheses: 0_i32,
14070        wn: 0_u16,
14071        rtk_receiver_id: 0_u8,
14072        rtk_health: 0_u8,
14073        rtk_rate: 0_u8,
14074        nsats: 0_u8,
14075        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14076    };
14077    #[cfg(feature = "arbitrary")]
14078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14079        use arbitrary::{Arbitrary, Unstructured};
14080        let mut buf = [0u8; 1024];
14081        rng.fill_bytes(&mut buf);
14082        let mut unstructured = Unstructured::new(&buf);
14083        Self::arbitrary(&mut unstructured).unwrap_or_default()
14084    }
14085}
14086impl Default for GPS2_RTK_DATA {
14087    fn default() -> Self {
14088        Self::DEFAULT.clone()
14089    }
14090}
14091impl MessageData for GPS2_RTK_DATA {
14092    type Message = MavMessage;
14093    const ID: u32 = 128u32;
14094    const NAME: &'static str = "GPS2_RTK";
14095    const EXTRA_CRC: u8 = 226u8;
14096    const ENCODED_LEN: usize = 35usize;
14097    fn deser(
14098        _version: MavlinkVersion,
14099        __input: &[u8],
14100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14101        let avail_len = __input.len();
14102        let mut payload_buf = [0; Self::ENCODED_LEN];
14103        let mut buf = if avail_len < Self::ENCODED_LEN {
14104            payload_buf[0..avail_len].copy_from_slice(__input);
14105            Bytes::new(&payload_buf)
14106        } else {
14107            Bytes::new(__input)
14108        };
14109        let mut __struct = Self::default();
14110        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14111        __struct.tow = buf.get_u32_le()?;
14112        __struct.baseline_a_mm = buf.get_i32_le()?;
14113        __struct.baseline_b_mm = buf.get_i32_le()?;
14114        __struct.baseline_c_mm = buf.get_i32_le()?;
14115        __struct.accuracy = buf.get_u32_le()?;
14116        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14117        __struct.wn = buf.get_u16_le()?;
14118        __struct.rtk_receiver_id = buf.get_u8()?;
14119        __struct.rtk_health = buf.get_u8()?;
14120        __struct.rtk_rate = buf.get_u8()?;
14121        __struct.nsats = buf.get_u8()?;
14122        let tmp = buf.get_u8()?;
14123        __struct.baseline_coords_type =
14124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14125                enum_type: "RtkBaselineCoordinateSystem",
14126                value: tmp as u64,
14127            })?;
14128        Ok(__struct)
14129    }
14130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14131        let mut __tmp = BytesMut::new(bytes);
14132        #[allow(clippy::absurd_extreme_comparisons)]
14133        #[allow(unused_comparisons)]
14134        if __tmp.remaining() < Self::ENCODED_LEN {
14135            panic!(
14136                "buffer is too small (need {} bytes, but got {})",
14137                Self::ENCODED_LEN,
14138                __tmp.remaining(),
14139            )
14140        }
14141        __tmp.put_u32_le(self.time_last_baseline_ms);
14142        __tmp.put_u32_le(self.tow);
14143        __tmp.put_i32_le(self.baseline_a_mm);
14144        __tmp.put_i32_le(self.baseline_b_mm);
14145        __tmp.put_i32_le(self.baseline_c_mm);
14146        __tmp.put_u32_le(self.accuracy);
14147        __tmp.put_i32_le(self.iar_num_hypotheses);
14148        __tmp.put_u16_le(self.wn);
14149        __tmp.put_u8(self.rtk_receiver_id);
14150        __tmp.put_u8(self.rtk_health);
14151        __tmp.put_u8(self.rtk_rate);
14152        __tmp.put_u8(self.nsats);
14153        __tmp.put_u8(self.baseline_coords_type as u8);
14154        if matches!(version, MavlinkVersion::V2) {
14155            let len = __tmp.len();
14156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14157        } else {
14158            __tmp.len()
14159        }
14160    }
14161}
14162#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14163#[doc = ""]
14164#[doc = "ID: 49"]
14165#[derive(Debug, Clone, PartialEq)]
14166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14168#[cfg_attr(feature = "ts", derive(TS))]
14169#[cfg_attr(feature = "ts", ts(export))]
14170pub struct GPS_GLOBAL_ORIGIN_DATA {
14171    #[doc = "Latitude (WGS84)"]
14172    pub latitude: i32,
14173    #[doc = "Longitude (WGS84)"]
14174    pub longitude: i32,
14175    #[doc = "Altitude (MSL). Positive for up."]
14176    pub altitude: i32,
14177    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14179    pub time_usec: u64,
14180}
14181impl GPS_GLOBAL_ORIGIN_DATA {
14182    pub const ENCODED_LEN: usize = 20usize;
14183    pub const DEFAULT: Self = Self {
14184        latitude: 0_i32,
14185        longitude: 0_i32,
14186        altitude: 0_i32,
14187        time_usec: 0_u64,
14188    };
14189    #[cfg(feature = "arbitrary")]
14190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14191        use arbitrary::{Arbitrary, Unstructured};
14192        let mut buf = [0u8; 1024];
14193        rng.fill_bytes(&mut buf);
14194        let mut unstructured = Unstructured::new(&buf);
14195        Self::arbitrary(&mut unstructured).unwrap_or_default()
14196    }
14197}
14198impl Default for GPS_GLOBAL_ORIGIN_DATA {
14199    fn default() -> Self {
14200        Self::DEFAULT.clone()
14201    }
14202}
14203impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14204    type Message = MavMessage;
14205    const ID: u32 = 49u32;
14206    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14207    const EXTRA_CRC: u8 = 39u8;
14208    const ENCODED_LEN: usize = 20usize;
14209    fn deser(
14210        _version: MavlinkVersion,
14211        __input: &[u8],
14212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14213        let avail_len = __input.len();
14214        let mut payload_buf = [0; Self::ENCODED_LEN];
14215        let mut buf = if avail_len < Self::ENCODED_LEN {
14216            payload_buf[0..avail_len].copy_from_slice(__input);
14217            Bytes::new(&payload_buf)
14218        } else {
14219            Bytes::new(__input)
14220        };
14221        let mut __struct = Self::default();
14222        __struct.latitude = buf.get_i32_le()?;
14223        __struct.longitude = buf.get_i32_le()?;
14224        __struct.altitude = buf.get_i32_le()?;
14225        __struct.time_usec = buf.get_u64_le()?;
14226        Ok(__struct)
14227    }
14228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14229        let mut __tmp = BytesMut::new(bytes);
14230        #[allow(clippy::absurd_extreme_comparisons)]
14231        #[allow(unused_comparisons)]
14232        if __tmp.remaining() < Self::ENCODED_LEN {
14233            panic!(
14234                "buffer is too small (need {} bytes, but got {})",
14235                Self::ENCODED_LEN,
14236                __tmp.remaining(),
14237            )
14238        }
14239        __tmp.put_i32_le(self.latitude);
14240        __tmp.put_i32_le(self.longitude);
14241        __tmp.put_i32_le(self.altitude);
14242        if matches!(version, MavlinkVersion::V2) {
14243            __tmp.put_u64_le(self.time_usec);
14244            let len = __tmp.len();
14245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14246        } else {
14247            __tmp.len()
14248        }
14249    }
14250}
14251#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14252#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14253#[doc = ""]
14254#[doc = "ID: 123"]
14255#[derive(Debug, Clone, PartialEq)]
14256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14258#[cfg_attr(feature = "ts", derive(TS))]
14259#[cfg_attr(feature = "ts", ts(export))]
14260pub struct GPS_INJECT_DATA_DATA {
14261    #[doc = "System ID"]
14262    pub target_system: u8,
14263    #[doc = "Component ID"]
14264    pub target_component: u8,
14265    #[doc = "Data length"]
14266    pub len: u8,
14267    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14268    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14269    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14270    pub data: [u8; 110],
14271}
14272impl GPS_INJECT_DATA_DATA {
14273    pub const ENCODED_LEN: usize = 113usize;
14274    pub const DEFAULT: Self = Self {
14275        target_system: 0_u8,
14276        target_component: 0_u8,
14277        len: 0_u8,
14278        data: [0_u8; 110usize],
14279    };
14280    #[cfg(feature = "arbitrary")]
14281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14282        use arbitrary::{Arbitrary, Unstructured};
14283        let mut buf = [0u8; 1024];
14284        rng.fill_bytes(&mut buf);
14285        let mut unstructured = Unstructured::new(&buf);
14286        Self::arbitrary(&mut unstructured).unwrap_or_default()
14287    }
14288}
14289impl Default for GPS_INJECT_DATA_DATA {
14290    fn default() -> Self {
14291        Self::DEFAULT.clone()
14292    }
14293}
14294impl MessageData for GPS_INJECT_DATA_DATA {
14295    type Message = MavMessage;
14296    const ID: u32 = 123u32;
14297    const NAME: &'static str = "GPS_INJECT_DATA";
14298    const EXTRA_CRC: u8 = 250u8;
14299    const ENCODED_LEN: usize = 113usize;
14300    fn deser(
14301        _version: MavlinkVersion,
14302        __input: &[u8],
14303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14304        let avail_len = __input.len();
14305        let mut payload_buf = [0; Self::ENCODED_LEN];
14306        let mut buf = if avail_len < Self::ENCODED_LEN {
14307            payload_buf[0..avail_len].copy_from_slice(__input);
14308            Bytes::new(&payload_buf)
14309        } else {
14310            Bytes::new(__input)
14311        };
14312        let mut __struct = Self::default();
14313        __struct.target_system = buf.get_u8()?;
14314        __struct.target_component = buf.get_u8()?;
14315        __struct.len = buf.get_u8()?;
14316        for v in &mut __struct.data {
14317            let val = buf.get_u8()?;
14318            *v = val;
14319        }
14320        Ok(__struct)
14321    }
14322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14323        let mut __tmp = BytesMut::new(bytes);
14324        #[allow(clippy::absurd_extreme_comparisons)]
14325        #[allow(unused_comparisons)]
14326        if __tmp.remaining() < Self::ENCODED_LEN {
14327            panic!(
14328                "buffer is too small (need {} bytes, but got {})",
14329                Self::ENCODED_LEN,
14330                __tmp.remaining(),
14331            )
14332        }
14333        __tmp.put_u8(self.target_system);
14334        __tmp.put_u8(self.target_component);
14335        __tmp.put_u8(self.len);
14336        for val in &self.data {
14337            __tmp.put_u8(*val);
14338        }
14339        if matches!(version, MavlinkVersion::V2) {
14340            let len = __tmp.len();
14341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14342        } else {
14343            __tmp.len()
14344        }
14345    }
14346}
14347#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14348#[doc = ""]
14349#[doc = "ID: 232"]
14350#[derive(Debug, Clone, PartialEq)]
14351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14353#[cfg_attr(feature = "ts", derive(TS))]
14354#[cfg_attr(feature = "ts", ts(export))]
14355pub struct GPS_INPUT_DATA {
14356    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14357    pub time_usec: u64,
14358    #[doc = "GPS time (from start of GPS week)"]
14359    pub time_week_ms: u32,
14360    #[doc = "Latitude (WGS84)"]
14361    pub lat: i32,
14362    #[doc = "Longitude (WGS84)"]
14363    pub lon: i32,
14364    #[doc = "Altitude (MSL). Positive for up."]
14365    pub alt: f32,
14366    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14367    pub hdop: f32,
14368    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14369    pub vdop: f32,
14370    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14371    pub vn: f32,
14372    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14373    pub ve: f32,
14374    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14375    pub vd: f32,
14376    #[doc = "GPS speed accuracy"]
14377    pub speed_accuracy: f32,
14378    #[doc = "GPS horizontal accuracy"]
14379    pub horiz_accuracy: f32,
14380    #[doc = "GPS vertical accuracy"]
14381    pub vert_accuracy: f32,
14382    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14383    pub ignore_flags: GpsInputIgnoreFlags,
14384    #[doc = "GPS week number"]
14385    pub time_week: u16,
14386    #[doc = "ID of the GPS for multiple GPS inputs"]
14387    pub gps_id: u8,
14388    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14389    pub fix_type: u8,
14390    #[doc = "Number of satellites visible."]
14391    pub satellites_visible: u8,
14392    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14393    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14394    pub yaw: u16,
14395}
14396impl GPS_INPUT_DATA {
14397    pub const ENCODED_LEN: usize = 65usize;
14398    pub const DEFAULT: Self = Self {
14399        time_usec: 0_u64,
14400        time_week_ms: 0_u32,
14401        lat: 0_i32,
14402        lon: 0_i32,
14403        alt: 0.0_f32,
14404        hdop: 0.0_f32,
14405        vdop: 0.0_f32,
14406        vn: 0.0_f32,
14407        ve: 0.0_f32,
14408        vd: 0.0_f32,
14409        speed_accuracy: 0.0_f32,
14410        horiz_accuracy: 0.0_f32,
14411        vert_accuracy: 0.0_f32,
14412        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14413        time_week: 0_u16,
14414        gps_id: 0_u8,
14415        fix_type: 0_u8,
14416        satellites_visible: 0_u8,
14417        yaw: 0_u16,
14418    };
14419    #[cfg(feature = "arbitrary")]
14420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14421        use arbitrary::{Arbitrary, Unstructured};
14422        let mut buf = [0u8; 1024];
14423        rng.fill_bytes(&mut buf);
14424        let mut unstructured = Unstructured::new(&buf);
14425        Self::arbitrary(&mut unstructured).unwrap_or_default()
14426    }
14427}
14428impl Default for GPS_INPUT_DATA {
14429    fn default() -> Self {
14430        Self::DEFAULT.clone()
14431    }
14432}
14433impl MessageData for GPS_INPUT_DATA {
14434    type Message = MavMessage;
14435    const ID: u32 = 232u32;
14436    const NAME: &'static str = "GPS_INPUT";
14437    const EXTRA_CRC: u8 = 151u8;
14438    const ENCODED_LEN: usize = 65usize;
14439    fn deser(
14440        _version: MavlinkVersion,
14441        __input: &[u8],
14442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14443        let avail_len = __input.len();
14444        let mut payload_buf = [0; Self::ENCODED_LEN];
14445        let mut buf = if avail_len < Self::ENCODED_LEN {
14446            payload_buf[0..avail_len].copy_from_slice(__input);
14447            Bytes::new(&payload_buf)
14448        } else {
14449            Bytes::new(__input)
14450        };
14451        let mut __struct = Self::default();
14452        __struct.time_usec = buf.get_u64_le()?;
14453        __struct.time_week_ms = buf.get_u32_le()?;
14454        __struct.lat = buf.get_i32_le()?;
14455        __struct.lon = buf.get_i32_le()?;
14456        __struct.alt = buf.get_f32_le()?;
14457        __struct.hdop = buf.get_f32_le()?;
14458        __struct.vdop = buf.get_f32_le()?;
14459        __struct.vn = buf.get_f32_le()?;
14460        __struct.ve = buf.get_f32_le()?;
14461        __struct.vd = buf.get_f32_le()?;
14462        __struct.speed_accuracy = buf.get_f32_le()?;
14463        __struct.horiz_accuracy = buf.get_f32_le()?;
14464        __struct.vert_accuracy = buf.get_f32_le()?;
14465        let tmp = buf.get_u16_le()?;
14466        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14467            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14468        )
14469        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14470            flag_type: "GpsInputIgnoreFlags",
14471            value: tmp as u64,
14472        })?;
14473        __struct.time_week = buf.get_u16_le()?;
14474        __struct.gps_id = buf.get_u8()?;
14475        __struct.fix_type = buf.get_u8()?;
14476        __struct.satellites_visible = buf.get_u8()?;
14477        __struct.yaw = buf.get_u16_le()?;
14478        Ok(__struct)
14479    }
14480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14481        let mut __tmp = BytesMut::new(bytes);
14482        #[allow(clippy::absurd_extreme_comparisons)]
14483        #[allow(unused_comparisons)]
14484        if __tmp.remaining() < Self::ENCODED_LEN {
14485            panic!(
14486                "buffer is too small (need {} bytes, but got {})",
14487                Self::ENCODED_LEN,
14488                __tmp.remaining(),
14489            )
14490        }
14491        __tmp.put_u64_le(self.time_usec);
14492        __tmp.put_u32_le(self.time_week_ms);
14493        __tmp.put_i32_le(self.lat);
14494        __tmp.put_i32_le(self.lon);
14495        __tmp.put_f32_le(self.alt);
14496        __tmp.put_f32_le(self.hdop);
14497        __tmp.put_f32_le(self.vdop);
14498        __tmp.put_f32_le(self.vn);
14499        __tmp.put_f32_le(self.ve);
14500        __tmp.put_f32_le(self.vd);
14501        __tmp.put_f32_le(self.speed_accuracy);
14502        __tmp.put_f32_le(self.horiz_accuracy);
14503        __tmp.put_f32_le(self.vert_accuracy);
14504        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14505        __tmp.put_u16_le(self.time_week);
14506        __tmp.put_u8(self.gps_id);
14507        __tmp.put_u8(self.fix_type);
14508        __tmp.put_u8(self.satellites_visible);
14509        if matches!(version, MavlinkVersion::V2) {
14510            __tmp.put_u16_le(self.yaw);
14511            let len = __tmp.len();
14512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14513        } else {
14514            __tmp.len()
14515        }
14516    }
14517}
14518#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14519#[doc = ""]
14520#[doc = "ID: 24"]
14521#[derive(Debug, Clone, PartialEq)]
14522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14524#[cfg_attr(feature = "ts", derive(TS))]
14525#[cfg_attr(feature = "ts", ts(export))]
14526pub struct GPS_RAW_INT_DATA {
14527    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14528    pub time_usec: u64,
14529    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14530    pub lat: i32,
14531    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14532    pub lon: i32,
14533    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14534    pub alt: i32,
14535    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14536    pub eph: u16,
14537    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14538    pub epv: u16,
14539    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14540    pub vel: u16,
14541    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14542    pub cog: u16,
14543    #[doc = "GPS fix type."]
14544    pub fix_type: GpsFixType,
14545    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14546    pub satellites_visible: u8,
14547    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14549    pub alt_ellipsoid: i32,
14550    #[doc = "Position uncertainty."]
14551    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14552    pub h_acc: u32,
14553    #[doc = "Altitude uncertainty."]
14554    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14555    pub v_acc: u32,
14556    #[doc = "Speed uncertainty."]
14557    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14558    pub vel_acc: u32,
14559    #[doc = "Heading / track uncertainty"]
14560    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14561    pub hdg_acc: u32,
14562    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14564    pub yaw: u16,
14565}
14566impl GPS_RAW_INT_DATA {
14567    pub const ENCODED_LEN: usize = 52usize;
14568    pub const DEFAULT: Self = Self {
14569        time_usec: 0_u64,
14570        lat: 0_i32,
14571        lon: 0_i32,
14572        alt: 0_i32,
14573        eph: 0_u16,
14574        epv: 0_u16,
14575        vel: 0_u16,
14576        cog: 0_u16,
14577        fix_type: GpsFixType::DEFAULT,
14578        satellites_visible: 0_u8,
14579        alt_ellipsoid: 0_i32,
14580        h_acc: 0_u32,
14581        v_acc: 0_u32,
14582        vel_acc: 0_u32,
14583        hdg_acc: 0_u32,
14584        yaw: 0_u16,
14585    };
14586    #[cfg(feature = "arbitrary")]
14587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14588        use arbitrary::{Arbitrary, Unstructured};
14589        let mut buf = [0u8; 1024];
14590        rng.fill_bytes(&mut buf);
14591        let mut unstructured = Unstructured::new(&buf);
14592        Self::arbitrary(&mut unstructured).unwrap_or_default()
14593    }
14594}
14595impl Default for GPS_RAW_INT_DATA {
14596    fn default() -> Self {
14597        Self::DEFAULT.clone()
14598    }
14599}
14600impl MessageData for GPS_RAW_INT_DATA {
14601    type Message = MavMessage;
14602    const ID: u32 = 24u32;
14603    const NAME: &'static str = "GPS_RAW_INT";
14604    const EXTRA_CRC: u8 = 24u8;
14605    const ENCODED_LEN: usize = 52usize;
14606    fn deser(
14607        _version: MavlinkVersion,
14608        __input: &[u8],
14609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14610        let avail_len = __input.len();
14611        let mut payload_buf = [0; Self::ENCODED_LEN];
14612        let mut buf = if avail_len < Self::ENCODED_LEN {
14613            payload_buf[0..avail_len].copy_from_slice(__input);
14614            Bytes::new(&payload_buf)
14615        } else {
14616            Bytes::new(__input)
14617        };
14618        let mut __struct = Self::default();
14619        __struct.time_usec = buf.get_u64_le()?;
14620        __struct.lat = buf.get_i32_le()?;
14621        __struct.lon = buf.get_i32_le()?;
14622        __struct.alt = buf.get_i32_le()?;
14623        __struct.eph = buf.get_u16_le()?;
14624        __struct.epv = buf.get_u16_le()?;
14625        __struct.vel = buf.get_u16_le()?;
14626        __struct.cog = buf.get_u16_le()?;
14627        let tmp = buf.get_u8()?;
14628        __struct.fix_type =
14629            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14630                enum_type: "GpsFixType",
14631                value: tmp as u64,
14632            })?;
14633        __struct.satellites_visible = buf.get_u8()?;
14634        __struct.alt_ellipsoid = buf.get_i32_le()?;
14635        __struct.h_acc = buf.get_u32_le()?;
14636        __struct.v_acc = buf.get_u32_le()?;
14637        __struct.vel_acc = buf.get_u32_le()?;
14638        __struct.hdg_acc = buf.get_u32_le()?;
14639        __struct.yaw = buf.get_u16_le()?;
14640        Ok(__struct)
14641    }
14642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14643        let mut __tmp = BytesMut::new(bytes);
14644        #[allow(clippy::absurd_extreme_comparisons)]
14645        #[allow(unused_comparisons)]
14646        if __tmp.remaining() < Self::ENCODED_LEN {
14647            panic!(
14648                "buffer is too small (need {} bytes, but got {})",
14649                Self::ENCODED_LEN,
14650                __tmp.remaining(),
14651            )
14652        }
14653        __tmp.put_u64_le(self.time_usec);
14654        __tmp.put_i32_le(self.lat);
14655        __tmp.put_i32_le(self.lon);
14656        __tmp.put_i32_le(self.alt);
14657        __tmp.put_u16_le(self.eph);
14658        __tmp.put_u16_le(self.epv);
14659        __tmp.put_u16_le(self.vel);
14660        __tmp.put_u16_le(self.cog);
14661        __tmp.put_u8(self.fix_type as u8);
14662        __tmp.put_u8(self.satellites_visible);
14663        if matches!(version, MavlinkVersion::V2) {
14664            __tmp.put_i32_le(self.alt_ellipsoid);
14665            __tmp.put_u32_le(self.h_acc);
14666            __tmp.put_u32_le(self.v_acc);
14667            __tmp.put_u32_le(self.vel_acc);
14668            __tmp.put_u32_le(self.hdg_acc);
14669            __tmp.put_u16_le(self.yaw);
14670            let len = __tmp.len();
14671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14672        } else {
14673            __tmp.len()
14674        }
14675    }
14676}
14677#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14678#[doc = ""]
14679#[doc = "ID: 233"]
14680#[derive(Debug, Clone, PartialEq)]
14681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14683#[cfg_attr(feature = "ts", derive(TS))]
14684#[cfg_attr(feature = "ts", ts(export))]
14685pub struct GPS_RTCM_DATA_DATA {
14686    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14687    pub flags: u8,
14688    #[doc = "data length"]
14689    pub len: u8,
14690    #[doc = "RTCM message (may be fragmented)"]
14691    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14692    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14693    pub data: [u8; 180],
14694}
14695impl GPS_RTCM_DATA_DATA {
14696    pub const ENCODED_LEN: usize = 182usize;
14697    pub const DEFAULT: Self = Self {
14698        flags: 0_u8,
14699        len: 0_u8,
14700        data: [0_u8; 180usize],
14701    };
14702    #[cfg(feature = "arbitrary")]
14703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14704        use arbitrary::{Arbitrary, Unstructured};
14705        let mut buf = [0u8; 1024];
14706        rng.fill_bytes(&mut buf);
14707        let mut unstructured = Unstructured::new(&buf);
14708        Self::arbitrary(&mut unstructured).unwrap_or_default()
14709    }
14710}
14711impl Default for GPS_RTCM_DATA_DATA {
14712    fn default() -> Self {
14713        Self::DEFAULT.clone()
14714    }
14715}
14716impl MessageData for GPS_RTCM_DATA_DATA {
14717    type Message = MavMessage;
14718    const ID: u32 = 233u32;
14719    const NAME: &'static str = "GPS_RTCM_DATA";
14720    const EXTRA_CRC: u8 = 35u8;
14721    const ENCODED_LEN: usize = 182usize;
14722    fn deser(
14723        _version: MavlinkVersion,
14724        __input: &[u8],
14725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14726        let avail_len = __input.len();
14727        let mut payload_buf = [0; Self::ENCODED_LEN];
14728        let mut buf = if avail_len < Self::ENCODED_LEN {
14729            payload_buf[0..avail_len].copy_from_slice(__input);
14730            Bytes::new(&payload_buf)
14731        } else {
14732            Bytes::new(__input)
14733        };
14734        let mut __struct = Self::default();
14735        __struct.flags = buf.get_u8()?;
14736        __struct.len = buf.get_u8()?;
14737        for v in &mut __struct.data {
14738            let val = buf.get_u8()?;
14739            *v = val;
14740        }
14741        Ok(__struct)
14742    }
14743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14744        let mut __tmp = BytesMut::new(bytes);
14745        #[allow(clippy::absurd_extreme_comparisons)]
14746        #[allow(unused_comparisons)]
14747        if __tmp.remaining() < Self::ENCODED_LEN {
14748            panic!(
14749                "buffer is too small (need {} bytes, but got {})",
14750                Self::ENCODED_LEN,
14751                __tmp.remaining(),
14752            )
14753        }
14754        __tmp.put_u8(self.flags);
14755        __tmp.put_u8(self.len);
14756        for val in &self.data {
14757            __tmp.put_u8(*val);
14758        }
14759        if matches!(version, MavlinkVersion::V2) {
14760            let len = __tmp.len();
14761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14762        } else {
14763            __tmp.len()
14764        }
14765    }
14766}
14767#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14768#[doc = ""]
14769#[doc = "ID: 127"]
14770#[derive(Debug, Clone, PartialEq)]
14771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14773#[cfg_attr(feature = "ts", derive(TS))]
14774#[cfg_attr(feature = "ts", ts(export))]
14775pub struct GPS_RTK_DATA {
14776    #[doc = "Time since boot of last baseline message received."]
14777    pub time_last_baseline_ms: u32,
14778    #[doc = "GPS Time of Week of last baseline"]
14779    pub tow: u32,
14780    #[doc = "Current baseline in ECEF x or NED north component."]
14781    pub baseline_a_mm: i32,
14782    #[doc = "Current baseline in ECEF y or NED east component."]
14783    pub baseline_b_mm: i32,
14784    #[doc = "Current baseline in ECEF z or NED down component."]
14785    pub baseline_c_mm: i32,
14786    #[doc = "Current estimate of baseline accuracy."]
14787    pub accuracy: u32,
14788    #[doc = "Current number of integer ambiguity hypotheses."]
14789    pub iar_num_hypotheses: i32,
14790    #[doc = "GPS Week Number of last baseline"]
14791    pub wn: u16,
14792    #[doc = "Identification of connected RTK receiver."]
14793    pub rtk_receiver_id: u8,
14794    #[doc = "GPS-specific health report for RTK data."]
14795    pub rtk_health: u8,
14796    #[doc = "Rate of baseline messages being received by GPS"]
14797    pub rtk_rate: u8,
14798    #[doc = "Current number of sats used for RTK calculation."]
14799    pub nsats: u8,
14800    #[doc = "Coordinate system of baseline"]
14801    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14802}
14803impl GPS_RTK_DATA {
14804    pub const ENCODED_LEN: usize = 35usize;
14805    pub const DEFAULT: Self = Self {
14806        time_last_baseline_ms: 0_u32,
14807        tow: 0_u32,
14808        baseline_a_mm: 0_i32,
14809        baseline_b_mm: 0_i32,
14810        baseline_c_mm: 0_i32,
14811        accuracy: 0_u32,
14812        iar_num_hypotheses: 0_i32,
14813        wn: 0_u16,
14814        rtk_receiver_id: 0_u8,
14815        rtk_health: 0_u8,
14816        rtk_rate: 0_u8,
14817        nsats: 0_u8,
14818        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14819    };
14820    #[cfg(feature = "arbitrary")]
14821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14822        use arbitrary::{Arbitrary, Unstructured};
14823        let mut buf = [0u8; 1024];
14824        rng.fill_bytes(&mut buf);
14825        let mut unstructured = Unstructured::new(&buf);
14826        Self::arbitrary(&mut unstructured).unwrap_or_default()
14827    }
14828}
14829impl Default for GPS_RTK_DATA {
14830    fn default() -> Self {
14831        Self::DEFAULT.clone()
14832    }
14833}
14834impl MessageData for GPS_RTK_DATA {
14835    type Message = MavMessage;
14836    const ID: u32 = 127u32;
14837    const NAME: &'static str = "GPS_RTK";
14838    const EXTRA_CRC: u8 = 25u8;
14839    const ENCODED_LEN: usize = 35usize;
14840    fn deser(
14841        _version: MavlinkVersion,
14842        __input: &[u8],
14843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14844        let avail_len = __input.len();
14845        let mut payload_buf = [0; Self::ENCODED_LEN];
14846        let mut buf = if avail_len < Self::ENCODED_LEN {
14847            payload_buf[0..avail_len].copy_from_slice(__input);
14848            Bytes::new(&payload_buf)
14849        } else {
14850            Bytes::new(__input)
14851        };
14852        let mut __struct = Self::default();
14853        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14854        __struct.tow = buf.get_u32_le()?;
14855        __struct.baseline_a_mm = buf.get_i32_le()?;
14856        __struct.baseline_b_mm = buf.get_i32_le()?;
14857        __struct.baseline_c_mm = buf.get_i32_le()?;
14858        __struct.accuracy = buf.get_u32_le()?;
14859        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14860        __struct.wn = buf.get_u16_le()?;
14861        __struct.rtk_receiver_id = buf.get_u8()?;
14862        __struct.rtk_health = buf.get_u8()?;
14863        __struct.rtk_rate = buf.get_u8()?;
14864        __struct.nsats = buf.get_u8()?;
14865        let tmp = buf.get_u8()?;
14866        __struct.baseline_coords_type =
14867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14868                enum_type: "RtkBaselineCoordinateSystem",
14869                value: tmp as u64,
14870            })?;
14871        Ok(__struct)
14872    }
14873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14874        let mut __tmp = BytesMut::new(bytes);
14875        #[allow(clippy::absurd_extreme_comparisons)]
14876        #[allow(unused_comparisons)]
14877        if __tmp.remaining() < Self::ENCODED_LEN {
14878            panic!(
14879                "buffer is too small (need {} bytes, but got {})",
14880                Self::ENCODED_LEN,
14881                __tmp.remaining(),
14882            )
14883        }
14884        __tmp.put_u32_le(self.time_last_baseline_ms);
14885        __tmp.put_u32_le(self.tow);
14886        __tmp.put_i32_le(self.baseline_a_mm);
14887        __tmp.put_i32_le(self.baseline_b_mm);
14888        __tmp.put_i32_le(self.baseline_c_mm);
14889        __tmp.put_u32_le(self.accuracy);
14890        __tmp.put_i32_le(self.iar_num_hypotheses);
14891        __tmp.put_u16_le(self.wn);
14892        __tmp.put_u8(self.rtk_receiver_id);
14893        __tmp.put_u8(self.rtk_health);
14894        __tmp.put_u8(self.rtk_rate);
14895        __tmp.put_u8(self.nsats);
14896        __tmp.put_u8(self.baseline_coords_type as u8);
14897        if matches!(version, MavlinkVersion::V2) {
14898            let len = __tmp.len();
14899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14900        } else {
14901            __tmp.len()
14902        }
14903    }
14904}
14905#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14906#[doc = ""]
14907#[doc = "ID: 25"]
14908#[derive(Debug, Clone, PartialEq)]
14909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14911#[cfg_attr(feature = "ts", derive(TS))]
14912#[cfg_attr(feature = "ts", ts(export))]
14913pub struct GPS_STATUS_DATA {
14914    #[doc = "Number of satellites visible"]
14915    pub satellites_visible: u8,
14916    #[doc = "Global satellite ID"]
14917    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14918    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14919    pub satellite_prn: [u8; 20],
14920    #[doc = "0: Satellite not used, 1: used for localization"]
14921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14922    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14923    pub satellite_used: [u8; 20],
14924    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14926    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14927    pub satellite_elevation: [u8; 20],
14928    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14930    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14931    pub satellite_azimuth: [u8; 20],
14932    #[doc = "Signal to noise ratio of satellite"]
14933    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14934    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14935    pub satellite_snr: [u8; 20],
14936}
14937impl GPS_STATUS_DATA {
14938    pub const ENCODED_LEN: usize = 101usize;
14939    pub const DEFAULT: Self = Self {
14940        satellites_visible: 0_u8,
14941        satellite_prn: [0_u8; 20usize],
14942        satellite_used: [0_u8; 20usize],
14943        satellite_elevation: [0_u8; 20usize],
14944        satellite_azimuth: [0_u8; 20usize],
14945        satellite_snr: [0_u8; 20usize],
14946    };
14947    #[cfg(feature = "arbitrary")]
14948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14949        use arbitrary::{Arbitrary, Unstructured};
14950        let mut buf = [0u8; 1024];
14951        rng.fill_bytes(&mut buf);
14952        let mut unstructured = Unstructured::new(&buf);
14953        Self::arbitrary(&mut unstructured).unwrap_or_default()
14954    }
14955}
14956impl Default for GPS_STATUS_DATA {
14957    fn default() -> Self {
14958        Self::DEFAULT.clone()
14959    }
14960}
14961impl MessageData for GPS_STATUS_DATA {
14962    type Message = MavMessage;
14963    const ID: u32 = 25u32;
14964    const NAME: &'static str = "GPS_STATUS";
14965    const EXTRA_CRC: u8 = 23u8;
14966    const ENCODED_LEN: usize = 101usize;
14967    fn deser(
14968        _version: MavlinkVersion,
14969        __input: &[u8],
14970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14971        let avail_len = __input.len();
14972        let mut payload_buf = [0; Self::ENCODED_LEN];
14973        let mut buf = if avail_len < Self::ENCODED_LEN {
14974            payload_buf[0..avail_len].copy_from_slice(__input);
14975            Bytes::new(&payload_buf)
14976        } else {
14977            Bytes::new(__input)
14978        };
14979        let mut __struct = Self::default();
14980        __struct.satellites_visible = buf.get_u8()?;
14981        for v in &mut __struct.satellite_prn {
14982            let val = buf.get_u8()?;
14983            *v = val;
14984        }
14985        for v in &mut __struct.satellite_used {
14986            let val = buf.get_u8()?;
14987            *v = val;
14988        }
14989        for v in &mut __struct.satellite_elevation {
14990            let val = buf.get_u8()?;
14991            *v = val;
14992        }
14993        for v in &mut __struct.satellite_azimuth {
14994            let val = buf.get_u8()?;
14995            *v = val;
14996        }
14997        for v in &mut __struct.satellite_snr {
14998            let val = buf.get_u8()?;
14999            *v = val;
15000        }
15001        Ok(__struct)
15002    }
15003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15004        let mut __tmp = BytesMut::new(bytes);
15005        #[allow(clippy::absurd_extreme_comparisons)]
15006        #[allow(unused_comparisons)]
15007        if __tmp.remaining() < Self::ENCODED_LEN {
15008            panic!(
15009                "buffer is too small (need {} bytes, but got {})",
15010                Self::ENCODED_LEN,
15011                __tmp.remaining(),
15012            )
15013        }
15014        __tmp.put_u8(self.satellites_visible);
15015        for val in &self.satellite_prn {
15016            __tmp.put_u8(*val);
15017        }
15018        for val in &self.satellite_used {
15019            __tmp.put_u8(*val);
15020        }
15021        for val in &self.satellite_elevation {
15022            __tmp.put_u8(*val);
15023        }
15024        for val in &self.satellite_azimuth {
15025            __tmp.put_u8(*val);
15026        }
15027        for val in &self.satellite_snr {
15028            __tmp.put_u8(*val);
15029        }
15030        if matches!(version, MavlinkVersion::V2) {
15031            let len = __tmp.len();
15032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15033        } else {
15034            __tmp.len()
15035        }
15036    }
15037}
15038#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15039#[doc = ""]
15040#[doc = "ID: 0"]
15041#[derive(Debug, Clone, PartialEq)]
15042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15044#[cfg_attr(feature = "ts", derive(TS))]
15045#[cfg_attr(feature = "ts", ts(export))]
15046pub struct HEARTBEAT_DATA {
15047    #[doc = "A bitfield for use for autopilot-specific flags"]
15048    pub custom_mode: u32,
15049    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15050    pub mavtype: MavType,
15051    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15052    pub autopilot: MavAutopilot,
15053    #[doc = "System mode bitmap."]
15054    pub base_mode: MavModeFlag,
15055    #[doc = "System status flag."]
15056    pub system_status: MavState,
15057    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15058    pub mavlink_version: u8,
15059}
15060impl HEARTBEAT_DATA {
15061    pub const ENCODED_LEN: usize = 9usize;
15062    pub const DEFAULT: Self = Self {
15063        custom_mode: 0_u32,
15064        mavtype: MavType::DEFAULT,
15065        autopilot: MavAutopilot::DEFAULT,
15066        base_mode: MavModeFlag::DEFAULT,
15067        system_status: MavState::DEFAULT,
15068        mavlink_version: MINOR_MAVLINK_VERSION,
15069    };
15070    #[cfg(feature = "arbitrary")]
15071    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15072        use arbitrary::{Arbitrary, Unstructured};
15073        let mut buf = [0u8; 1024];
15074        rng.fill_bytes(&mut buf);
15075        let mut unstructured = Unstructured::new(&buf);
15076        Self::arbitrary(&mut unstructured).unwrap_or_default()
15077    }
15078}
15079impl Default for HEARTBEAT_DATA {
15080    fn default() -> Self {
15081        Self::DEFAULT.clone()
15082    }
15083}
15084impl MessageData for HEARTBEAT_DATA {
15085    type Message = MavMessage;
15086    const ID: u32 = 0u32;
15087    const NAME: &'static str = "HEARTBEAT";
15088    const EXTRA_CRC: u8 = 50u8;
15089    const ENCODED_LEN: usize = 9usize;
15090    fn deser(
15091        _version: MavlinkVersion,
15092        __input: &[u8],
15093    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15094        let avail_len = __input.len();
15095        let mut payload_buf = [0; Self::ENCODED_LEN];
15096        let mut buf = if avail_len < Self::ENCODED_LEN {
15097            payload_buf[0..avail_len].copy_from_slice(__input);
15098            Bytes::new(&payload_buf)
15099        } else {
15100            Bytes::new(__input)
15101        };
15102        let mut __struct = Self::default();
15103        __struct.custom_mode = buf.get_u32_le()?;
15104        let tmp = buf.get_u8()?;
15105        __struct.mavtype =
15106            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15107                enum_type: "MavType",
15108                value: tmp as u64,
15109            })?;
15110        let tmp = buf.get_u8()?;
15111        __struct.autopilot =
15112            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15113                enum_type: "MavAutopilot",
15114                value: tmp as u64,
15115            })?;
15116        let tmp = buf.get_u8()?;
15117        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15118            ::mavlink_core::error::ParserError::InvalidFlag {
15119                flag_type: "MavModeFlag",
15120                value: tmp as u64,
15121            },
15122        )?;
15123        let tmp = buf.get_u8()?;
15124        __struct.system_status =
15125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15126                enum_type: "MavState",
15127                value: tmp as u64,
15128            })?;
15129        __struct.mavlink_version = buf.get_u8()?;
15130        Ok(__struct)
15131    }
15132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15133        let mut __tmp = BytesMut::new(bytes);
15134        #[allow(clippy::absurd_extreme_comparisons)]
15135        #[allow(unused_comparisons)]
15136        if __tmp.remaining() < Self::ENCODED_LEN {
15137            panic!(
15138                "buffer is too small (need {} bytes, but got {})",
15139                Self::ENCODED_LEN,
15140                __tmp.remaining(),
15141            )
15142        }
15143        __tmp.put_u32_le(self.custom_mode);
15144        __tmp.put_u8(self.mavtype as u8);
15145        __tmp.put_u8(self.autopilot as u8);
15146        __tmp.put_u8(self.base_mode.bits() as u8);
15147        __tmp.put_u8(self.system_status as u8);
15148        __tmp.put_u8(self.mavlink_version);
15149        if matches!(version, MavlinkVersion::V2) {
15150            let len = __tmp.len();
15151            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15152        } else {
15153            __tmp.len()
15154        }
15155    }
15156}
15157#[doc = "Herelink Telemetry."]
15158#[doc = ""]
15159#[doc = "ID: 50003"]
15160#[derive(Debug, Clone, PartialEq)]
15161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15163#[cfg_attr(feature = "ts", derive(TS))]
15164#[cfg_attr(feature = "ts", ts(export))]
15165pub struct HERELINK_TELEM_DATA {
15166    pub rf_freq: u32,
15167    pub link_bw: u32,
15168    pub link_rate: u32,
15169    pub snr: i16,
15170    pub cpu_temp: i16,
15171    pub board_temp: i16,
15172    pub rssi: u8,
15173}
15174impl HERELINK_TELEM_DATA {
15175    pub const ENCODED_LEN: usize = 19usize;
15176    pub const DEFAULT: Self = Self {
15177        rf_freq: 0_u32,
15178        link_bw: 0_u32,
15179        link_rate: 0_u32,
15180        snr: 0_i16,
15181        cpu_temp: 0_i16,
15182        board_temp: 0_i16,
15183        rssi: 0_u8,
15184    };
15185    #[cfg(feature = "arbitrary")]
15186    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15187        use arbitrary::{Arbitrary, Unstructured};
15188        let mut buf = [0u8; 1024];
15189        rng.fill_bytes(&mut buf);
15190        let mut unstructured = Unstructured::new(&buf);
15191        Self::arbitrary(&mut unstructured).unwrap_or_default()
15192    }
15193}
15194impl Default for HERELINK_TELEM_DATA {
15195    fn default() -> Self {
15196        Self::DEFAULT.clone()
15197    }
15198}
15199impl MessageData for HERELINK_TELEM_DATA {
15200    type Message = MavMessage;
15201    const ID: u32 = 50003u32;
15202    const NAME: &'static str = "HERELINK_TELEM";
15203    const EXTRA_CRC: u8 = 62u8;
15204    const ENCODED_LEN: usize = 19usize;
15205    fn deser(
15206        _version: MavlinkVersion,
15207        __input: &[u8],
15208    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15209        let avail_len = __input.len();
15210        let mut payload_buf = [0; Self::ENCODED_LEN];
15211        let mut buf = if avail_len < Self::ENCODED_LEN {
15212            payload_buf[0..avail_len].copy_from_slice(__input);
15213            Bytes::new(&payload_buf)
15214        } else {
15215            Bytes::new(__input)
15216        };
15217        let mut __struct = Self::default();
15218        __struct.rf_freq = buf.get_u32_le()?;
15219        __struct.link_bw = buf.get_u32_le()?;
15220        __struct.link_rate = buf.get_u32_le()?;
15221        __struct.snr = buf.get_i16_le()?;
15222        __struct.cpu_temp = buf.get_i16_le()?;
15223        __struct.board_temp = buf.get_i16_le()?;
15224        __struct.rssi = buf.get_u8()?;
15225        Ok(__struct)
15226    }
15227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15228        let mut __tmp = BytesMut::new(bytes);
15229        #[allow(clippy::absurd_extreme_comparisons)]
15230        #[allow(unused_comparisons)]
15231        if __tmp.remaining() < Self::ENCODED_LEN {
15232            panic!(
15233                "buffer is too small (need {} bytes, but got {})",
15234                Self::ENCODED_LEN,
15235                __tmp.remaining(),
15236            )
15237        }
15238        __tmp.put_u32_le(self.rf_freq);
15239        __tmp.put_u32_le(self.link_bw);
15240        __tmp.put_u32_le(self.link_rate);
15241        __tmp.put_i16_le(self.snr);
15242        __tmp.put_i16_le(self.cpu_temp);
15243        __tmp.put_i16_le(self.board_temp);
15244        __tmp.put_u8(self.rssi);
15245        if matches!(version, MavlinkVersion::V2) {
15246            let len = __tmp.len();
15247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15248        } else {
15249            __tmp.len()
15250        }
15251    }
15252}
15253#[doc = "Information about video stream."]
15254#[doc = ""]
15255#[doc = "ID: 50002"]
15256#[derive(Debug, Clone, PartialEq)]
15257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15259#[cfg_attr(feature = "ts", derive(TS))]
15260#[cfg_attr(feature = "ts", ts(export))]
15261pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15262    #[doc = "Frame rate."]
15263    pub framerate: f32,
15264    #[doc = "Bit rate."]
15265    pub bitrate: u32,
15266    #[doc = "Horizontal resolution."]
15267    pub resolution_h: u16,
15268    #[doc = "Vertical resolution."]
15269    pub resolution_v: u16,
15270    #[doc = "Video image rotation clockwise."]
15271    pub rotation: u16,
15272    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
15273    pub camera_id: u8,
15274    #[doc = "Number of streams available."]
15275    pub status: u8,
15276    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
15277    #[cfg_attr(feature = "ts", ts(type = "string"))]
15278    pub uri: CharArray<230>,
15279}
15280impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15281    pub const ENCODED_LEN: usize = 246usize;
15282    pub const DEFAULT: Self = Self {
15283        framerate: 0.0_f32,
15284        bitrate: 0_u32,
15285        resolution_h: 0_u16,
15286        resolution_v: 0_u16,
15287        rotation: 0_u16,
15288        camera_id: 0_u8,
15289        status: 0_u8,
15290        uri: CharArray::new([0_u8; 230usize]),
15291    };
15292    #[cfg(feature = "arbitrary")]
15293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15294        use arbitrary::{Arbitrary, Unstructured};
15295        let mut buf = [0u8; 1024];
15296        rng.fill_bytes(&mut buf);
15297        let mut unstructured = Unstructured::new(&buf);
15298        Self::arbitrary(&mut unstructured).unwrap_or_default()
15299    }
15300}
15301impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15302    fn default() -> Self {
15303        Self::DEFAULT.clone()
15304    }
15305}
15306impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15307    type Message = MavMessage;
15308    const ID: u32 = 50002u32;
15309    const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
15310    const EXTRA_CRC: u8 = 181u8;
15311    const ENCODED_LEN: usize = 246usize;
15312    fn deser(
15313        _version: MavlinkVersion,
15314        __input: &[u8],
15315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15316        let avail_len = __input.len();
15317        let mut payload_buf = [0; Self::ENCODED_LEN];
15318        let mut buf = if avail_len < Self::ENCODED_LEN {
15319            payload_buf[0..avail_len].copy_from_slice(__input);
15320            Bytes::new(&payload_buf)
15321        } else {
15322            Bytes::new(__input)
15323        };
15324        let mut __struct = Self::default();
15325        __struct.framerate = buf.get_f32_le()?;
15326        __struct.bitrate = buf.get_u32_le()?;
15327        __struct.resolution_h = buf.get_u16_le()?;
15328        __struct.resolution_v = buf.get_u16_le()?;
15329        __struct.rotation = buf.get_u16_le()?;
15330        __struct.camera_id = buf.get_u8()?;
15331        __struct.status = buf.get_u8()?;
15332        let mut tmp = [0_u8; 230usize];
15333        for v in &mut tmp {
15334            *v = buf.get_u8()?;
15335        }
15336        __struct.uri = CharArray::new(tmp);
15337        Ok(__struct)
15338    }
15339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15340        let mut __tmp = BytesMut::new(bytes);
15341        #[allow(clippy::absurd_extreme_comparisons)]
15342        #[allow(unused_comparisons)]
15343        if __tmp.remaining() < Self::ENCODED_LEN {
15344            panic!(
15345                "buffer is too small (need {} bytes, but got {})",
15346                Self::ENCODED_LEN,
15347                __tmp.remaining(),
15348            )
15349        }
15350        __tmp.put_f32_le(self.framerate);
15351        __tmp.put_u32_le(self.bitrate);
15352        __tmp.put_u16_le(self.resolution_h);
15353        __tmp.put_u16_le(self.resolution_v);
15354        __tmp.put_u16_le(self.rotation);
15355        __tmp.put_u8(self.camera_id);
15356        __tmp.put_u8(self.status);
15357        for val in &self.uri {
15358            __tmp.put_u8(*val);
15359        }
15360        if matches!(version, MavlinkVersion::V2) {
15361            let len = __tmp.len();
15362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15363        } else {
15364            __tmp.len()
15365        }
15366    }
15367}
15368#[doc = "The IMU readings in SI units in NED body frame."]
15369#[doc = ""]
15370#[doc = "ID: 105"]
15371#[derive(Debug, Clone, PartialEq)]
15372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15374#[cfg_attr(feature = "ts", derive(TS))]
15375#[cfg_attr(feature = "ts", ts(export))]
15376pub struct HIGHRES_IMU_DATA {
15377    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15378    pub time_usec: u64,
15379    #[doc = "X acceleration"]
15380    pub xacc: f32,
15381    #[doc = "Y acceleration"]
15382    pub yacc: f32,
15383    #[doc = "Z acceleration"]
15384    pub zacc: f32,
15385    #[doc = "Angular speed around X axis"]
15386    pub xgyro: f32,
15387    #[doc = "Angular speed around Y axis"]
15388    pub ygyro: f32,
15389    #[doc = "Angular speed around Z axis"]
15390    pub zgyro: f32,
15391    #[doc = "X Magnetic field"]
15392    pub xmag: f32,
15393    #[doc = "Y Magnetic field"]
15394    pub ymag: f32,
15395    #[doc = "Z Magnetic field"]
15396    pub zmag: f32,
15397    #[doc = "Absolute pressure"]
15398    pub abs_pressure: f32,
15399    #[doc = "Differential pressure"]
15400    pub diff_pressure: f32,
15401    #[doc = "Altitude calculated from pressure"]
15402    pub pressure_alt: f32,
15403    #[doc = "Temperature"]
15404    pub temperature: f32,
15405    #[doc = "Bitmap for fields that have updated since last message"]
15406    pub fields_updated: HighresImuUpdatedFlags,
15407    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15408    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15409    pub id: u8,
15410}
15411impl HIGHRES_IMU_DATA {
15412    pub const ENCODED_LEN: usize = 63usize;
15413    pub const DEFAULT: Self = Self {
15414        time_usec: 0_u64,
15415        xacc: 0.0_f32,
15416        yacc: 0.0_f32,
15417        zacc: 0.0_f32,
15418        xgyro: 0.0_f32,
15419        ygyro: 0.0_f32,
15420        zgyro: 0.0_f32,
15421        xmag: 0.0_f32,
15422        ymag: 0.0_f32,
15423        zmag: 0.0_f32,
15424        abs_pressure: 0.0_f32,
15425        diff_pressure: 0.0_f32,
15426        pressure_alt: 0.0_f32,
15427        temperature: 0.0_f32,
15428        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15429        id: 0_u8,
15430    };
15431    #[cfg(feature = "arbitrary")]
15432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15433        use arbitrary::{Arbitrary, Unstructured};
15434        let mut buf = [0u8; 1024];
15435        rng.fill_bytes(&mut buf);
15436        let mut unstructured = Unstructured::new(&buf);
15437        Self::arbitrary(&mut unstructured).unwrap_or_default()
15438    }
15439}
15440impl Default for HIGHRES_IMU_DATA {
15441    fn default() -> Self {
15442        Self::DEFAULT.clone()
15443    }
15444}
15445impl MessageData for HIGHRES_IMU_DATA {
15446    type Message = MavMessage;
15447    const ID: u32 = 105u32;
15448    const NAME: &'static str = "HIGHRES_IMU";
15449    const EXTRA_CRC: u8 = 93u8;
15450    const ENCODED_LEN: usize = 63usize;
15451    fn deser(
15452        _version: MavlinkVersion,
15453        __input: &[u8],
15454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15455        let avail_len = __input.len();
15456        let mut payload_buf = [0; Self::ENCODED_LEN];
15457        let mut buf = if avail_len < Self::ENCODED_LEN {
15458            payload_buf[0..avail_len].copy_from_slice(__input);
15459            Bytes::new(&payload_buf)
15460        } else {
15461            Bytes::new(__input)
15462        };
15463        let mut __struct = Self::default();
15464        __struct.time_usec = buf.get_u64_le()?;
15465        __struct.xacc = buf.get_f32_le()?;
15466        __struct.yacc = buf.get_f32_le()?;
15467        __struct.zacc = buf.get_f32_le()?;
15468        __struct.xgyro = buf.get_f32_le()?;
15469        __struct.ygyro = buf.get_f32_le()?;
15470        __struct.zgyro = buf.get_f32_le()?;
15471        __struct.xmag = buf.get_f32_le()?;
15472        __struct.ymag = buf.get_f32_le()?;
15473        __struct.zmag = buf.get_f32_le()?;
15474        __struct.abs_pressure = buf.get_f32_le()?;
15475        __struct.diff_pressure = buf.get_f32_le()?;
15476        __struct.pressure_alt = buf.get_f32_le()?;
15477        __struct.temperature = buf.get_f32_le()?;
15478        let tmp = buf.get_u16_le()?;
15479        __struct.fields_updated =
15480            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15481                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15482                    flag_type: "HighresImuUpdatedFlags",
15483                    value: tmp as u64,
15484                })?;
15485        __struct.id = buf.get_u8()?;
15486        Ok(__struct)
15487    }
15488    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15489        let mut __tmp = BytesMut::new(bytes);
15490        #[allow(clippy::absurd_extreme_comparisons)]
15491        #[allow(unused_comparisons)]
15492        if __tmp.remaining() < Self::ENCODED_LEN {
15493            panic!(
15494                "buffer is too small (need {} bytes, but got {})",
15495                Self::ENCODED_LEN,
15496                __tmp.remaining(),
15497            )
15498        }
15499        __tmp.put_u64_le(self.time_usec);
15500        __tmp.put_f32_le(self.xacc);
15501        __tmp.put_f32_le(self.yacc);
15502        __tmp.put_f32_le(self.zacc);
15503        __tmp.put_f32_le(self.xgyro);
15504        __tmp.put_f32_le(self.ygyro);
15505        __tmp.put_f32_le(self.zgyro);
15506        __tmp.put_f32_le(self.xmag);
15507        __tmp.put_f32_le(self.ymag);
15508        __tmp.put_f32_le(self.zmag);
15509        __tmp.put_f32_le(self.abs_pressure);
15510        __tmp.put_f32_le(self.diff_pressure);
15511        __tmp.put_f32_le(self.pressure_alt);
15512        __tmp.put_f32_le(self.temperature);
15513        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15514        if matches!(version, MavlinkVersion::V2) {
15515            __tmp.put_u8(self.id);
15516            let len = __tmp.len();
15517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15518        } else {
15519            __tmp.len()
15520        }
15521    }
15522}
15523#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15524#[doc = "Message appropriate for high latency connections like Iridium."]
15525#[doc = ""]
15526#[doc = "ID: 234"]
15527#[derive(Debug, Clone, PartialEq)]
15528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15530#[cfg_attr(feature = "ts", derive(TS))]
15531#[cfg_attr(feature = "ts", ts(export))]
15532pub struct HIGH_LATENCY_DATA {
15533    #[doc = "A bitfield for use for autopilot-specific flags."]
15534    pub custom_mode: u32,
15535    #[doc = "Latitude"]
15536    pub latitude: i32,
15537    #[doc = "Longitude"]
15538    pub longitude: i32,
15539    #[doc = "roll"]
15540    pub roll: i16,
15541    #[doc = "pitch"]
15542    pub pitch: i16,
15543    #[doc = "heading"]
15544    pub heading: u16,
15545    #[doc = "heading setpoint"]
15546    pub heading_sp: i16,
15547    #[doc = "Altitude above mean sea level"]
15548    pub altitude_amsl: i16,
15549    #[doc = "Altitude setpoint relative to the home position"]
15550    pub altitude_sp: i16,
15551    #[doc = "distance to target"]
15552    pub wp_distance: u16,
15553    #[doc = "Bitmap of enabled system modes."]
15554    pub base_mode: MavModeFlag,
15555    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15556    pub landed_state: MavLandedState,
15557    #[doc = "throttle (percentage)"]
15558    pub throttle: i8,
15559    #[doc = "airspeed"]
15560    pub airspeed: u8,
15561    #[doc = "airspeed setpoint"]
15562    pub airspeed_sp: u8,
15563    #[doc = "groundspeed"]
15564    pub groundspeed: u8,
15565    #[doc = "climb rate"]
15566    pub climb_rate: i8,
15567    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15568    pub gps_nsat: u8,
15569    #[doc = "GPS Fix type."]
15570    pub gps_fix_type: GpsFixType,
15571    #[doc = "Remaining battery (percentage)"]
15572    pub battery_remaining: u8,
15573    #[doc = "Autopilot temperature (degrees C)"]
15574    pub temperature: i8,
15575    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15576    pub temperature_air: i8,
15577    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15578    pub failsafe: u8,
15579    #[doc = "current waypoint number"]
15580    pub wp_num: u8,
15581}
15582impl HIGH_LATENCY_DATA {
15583    pub const ENCODED_LEN: usize = 40usize;
15584    pub const DEFAULT: Self = Self {
15585        custom_mode: 0_u32,
15586        latitude: 0_i32,
15587        longitude: 0_i32,
15588        roll: 0_i16,
15589        pitch: 0_i16,
15590        heading: 0_u16,
15591        heading_sp: 0_i16,
15592        altitude_amsl: 0_i16,
15593        altitude_sp: 0_i16,
15594        wp_distance: 0_u16,
15595        base_mode: MavModeFlag::DEFAULT,
15596        landed_state: MavLandedState::DEFAULT,
15597        throttle: 0_i8,
15598        airspeed: 0_u8,
15599        airspeed_sp: 0_u8,
15600        groundspeed: 0_u8,
15601        climb_rate: 0_i8,
15602        gps_nsat: 0_u8,
15603        gps_fix_type: GpsFixType::DEFAULT,
15604        battery_remaining: 0_u8,
15605        temperature: 0_i8,
15606        temperature_air: 0_i8,
15607        failsafe: 0_u8,
15608        wp_num: 0_u8,
15609    };
15610    #[cfg(feature = "arbitrary")]
15611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15612        use arbitrary::{Arbitrary, Unstructured};
15613        let mut buf = [0u8; 1024];
15614        rng.fill_bytes(&mut buf);
15615        let mut unstructured = Unstructured::new(&buf);
15616        Self::arbitrary(&mut unstructured).unwrap_or_default()
15617    }
15618}
15619impl Default for HIGH_LATENCY_DATA {
15620    fn default() -> Self {
15621        Self::DEFAULT.clone()
15622    }
15623}
15624impl MessageData for HIGH_LATENCY_DATA {
15625    type Message = MavMessage;
15626    const ID: u32 = 234u32;
15627    const NAME: &'static str = "HIGH_LATENCY";
15628    const EXTRA_CRC: u8 = 150u8;
15629    const ENCODED_LEN: usize = 40usize;
15630    fn deser(
15631        _version: MavlinkVersion,
15632        __input: &[u8],
15633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15634        let avail_len = __input.len();
15635        let mut payload_buf = [0; Self::ENCODED_LEN];
15636        let mut buf = if avail_len < Self::ENCODED_LEN {
15637            payload_buf[0..avail_len].copy_from_slice(__input);
15638            Bytes::new(&payload_buf)
15639        } else {
15640            Bytes::new(__input)
15641        };
15642        let mut __struct = Self::default();
15643        __struct.custom_mode = buf.get_u32_le()?;
15644        __struct.latitude = buf.get_i32_le()?;
15645        __struct.longitude = buf.get_i32_le()?;
15646        __struct.roll = buf.get_i16_le()?;
15647        __struct.pitch = buf.get_i16_le()?;
15648        __struct.heading = buf.get_u16_le()?;
15649        __struct.heading_sp = buf.get_i16_le()?;
15650        __struct.altitude_amsl = buf.get_i16_le()?;
15651        __struct.altitude_sp = buf.get_i16_le()?;
15652        __struct.wp_distance = buf.get_u16_le()?;
15653        let tmp = buf.get_u8()?;
15654        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15655            ::mavlink_core::error::ParserError::InvalidFlag {
15656                flag_type: "MavModeFlag",
15657                value: tmp as u64,
15658            },
15659        )?;
15660        let tmp = buf.get_u8()?;
15661        __struct.landed_state =
15662            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15663                enum_type: "MavLandedState",
15664                value: tmp as u64,
15665            })?;
15666        __struct.throttle = buf.get_i8()?;
15667        __struct.airspeed = buf.get_u8()?;
15668        __struct.airspeed_sp = buf.get_u8()?;
15669        __struct.groundspeed = buf.get_u8()?;
15670        __struct.climb_rate = buf.get_i8()?;
15671        __struct.gps_nsat = buf.get_u8()?;
15672        let tmp = buf.get_u8()?;
15673        __struct.gps_fix_type =
15674            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15675                enum_type: "GpsFixType",
15676                value: tmp as u64,
15677            })?;
15678        __struct.battery_remaining = buf.get_u8()?;
15679        __struct.temperature = buf.get_i8()?;
15680        __struct.temperature_air = buf.get_i8()?;
15681        __struct.failsafe = buf.get_u8()?;
15682        __struct.wp_num = buf.get_u8()?;
15683        Ok(__struct)
15684    }
15685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15686        let mut __tmp = BytesMut::new(bytes);
15687        #[allow(clippy::absurd_extreme_comparisons)]
15688        #[allow(unused_comparisons)]
15689        if __tmp.remaining() < Self::ENCODED_LEN {
15690            panic!(
15691                "buffer is too small (need {} bytes, but got {})",
15692                Self::ENCODED_LEN,
15693                __tmp.remaining(),
15694            )
15695        }
15696        __tmp.put_u32_le(self.custom_mode);
15697        __tmp.put_i32_le(self.latitude);
15698        __tmp.put_i32_le(self.longitude);
15699        __tmp.put_i16_le(self.roll);
15700        __tmp.put_i16_le(self.pitch);
15701        __tmp.put_u16_le(self.heading);
15702        __tmp.put_i16_le(self.heading_sp);
15703        __tmp.put_i16_le(self.altitude_amsl);
15704        __tmp.put_i16_le(self.altitude_sp);
15705        __tmp.put_u16_le(self.wp_distance);
15706        __tmp.put_u8(self.base_mode.bits() as u8);
15707        __tmp.put_u8(self.landed_state as u8);
15708        __tmp.put_i8(self.throttle);
15709        __tmp.put_u8(self.airspeed);
15710        __tmp.put_u8(self.airspeed_sp);
15711        __tmp.put_u8(self.groundspeed);
15712        __tmp.put_i8(self.climb_rate);
15713        __tmp.put_u8(self.gps_nsat);
15714        __tmp.put_u8(self.gps_fix_type as u8);
15715        __tmp.put_u8(self.battery_remaining);
15716        __tmp.put_i8(self.temperature);
15717        __tmp.put_i8(self.temperature_air);
15718        __tmp.put_u8(self.failsafe);
15719        __tmp.put_u8(self.wp_num);
15720        if matches!(version, MavlinkVersion::V2) {
15721            let len = __tmp.len();
15722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15723        } else {
15724            __tmp.len()
15725        }
15726    }
15727}
15728#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15729#[doc = ""]
15730#[doc = "ID: 235"]
15731#[derive(Debug, Clone, PartialEq)]
15732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15734#[cfg_attr(feature = "ts", derive(TS))]
15735#[cfg_attr(feature = "ts", ts(export))]
15736pub struct HIGH_LATENCY2_DATA {
15737    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15738    pub timestamp: u32,
15739    #[doc = "Latitude"]
15740    pub latitude: i32,
15741    #[doc = "Longitude"]
15742    pub longitude: i32,
15743    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15744    pub custom_mode: u16,
15745    #[doc = "Altitude above mean sea level"]
15746    pub altitude: i16,
15747    #[doc = "Altitude setpoint"]
15748    pub target_altitude: i16,
15749    #[doc = "Distance to target waypoint or position"]
15750    pub target_distance: u16,
15751    #[doc = "Current waypoint number"]
15752    pub wp_num: u16,
15753    #[doc = "Bitmap of failure flags."]
15754    pub failure_flags: HlFailureFlag,
15755    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15756    pub mavtype: MavType,
15757    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15758    pub autopilot: MavAutopilot,
15759    #[doc = "Heading"]
15760    pub heading: u8,
15761    #[doc = "Heading setpoint"]
15762    pub target_heading: u8,
15763    #[doc = "Throttle"]
15764    pub throttle: u8,
15765    #[doc = "Airspeed"]
15766    pub airspeed: u8,
15767    #[doc = "Airspeed setpoint"]
15768    pub airspeed_sp: u8,
15769    #[doc = "Groundspeed"]
15770    pub groundspeed: u8,
15771    #[doc = "Windspeed"]
15772    pub windspeed: u8,
15773    #[doc = "Wind heading"]
15774    pub wind_heading: u8,
15775    #[doc = "Maximum error horizontal position since last message"]
15776    pub eph: u8,
15777    #[doc = "Maximum error vertical position since last message"]
15778    pub epv: u8,
15779    #[doc = "Air temperature"]
15780    pub temperature_air: i8,
15781    #[doc = "Maximum climb rate magnitude since last message"]
15782    pub climb_rate: i8,
15783    #[doc = "Battery level (-1 if field not provided)."]
15784    pub battery: i8,
15785    #[doc = "Field for custom payload."]
15786    pub custom0: i8,
15787    #[doc = "Field for custom payload."]
15788    pub custom1: i8,
15789    #[doc = "Field for custom payload."]
15790    pub custom2: i8,
15791}
15792impl HIGH_LATENCY2_DATA {
15793    pub const ENCODED_LEN: usize = 42usize;
15794    pub const DEFAULT: Self = Self {
15795        timestamp: 0_u32,
15796        latitude: 0_i32,
15797        longitude: 0_i32,
15798        custom_mode: 0_u16,
15799        altitude: 0_i16,
15800        target_altitude: 0_i16,
15801        target_distance: 0_u16,
15802        wp_num: 0_u16,
15803        failure_flags: HlFailureFlag::DEFAULT,
15804        mavtype: MavType::DEFAULT,
15805        autopilot: MavAutopilot::DEFAULT,
15806        heading: 0_u8,
15807        target_heading: 0_u8,
15808        throttle: 0_u8,
15809        airspeed: 0_u8,
15810        airspeed_sp: 0_u8,
15811        groundspeed: 0_u8,
15812        windspeed: 0_u8,
15813        wind_heading: 0_u8,
15814        eph: 0_u8,
15815        epv: 0_u8,
15816        temperature_air: 0_i8,
15817        climb_rate: 0_i8,
15818        battery: 0_i8,
15819        custom0: 0_i8,
15820        custom1: 0_i8,
15821        custom2: 0_i8,
15822    };
15823    #[cfg(feature = "arbitrary")]
15824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15825        use arbitrary::{Arbitrary, Unstructured};
15826        let mut buf = [0u8; 1024];
15827        rng.fill_bytes(&mut buf);
15828        let mut unstructured = Unstructured::new(&buf);
15829        Self::arbitrary(&mut unstructured).unwrap_or_default()
15830    }
15831}
15832impl Default for HIGH_LATENCY2_DATA {
15833    fn default() -> Self {
15834        Self::DEFAULT.clone()
15835    }
15836}
15837impl MessageData for HIGH_LATENCY2_DATA {
15838    type Message = MavMessage;
15839    const ID: u32 = 235u32;
15840    const NAME: &'static str = "HIGH_LATENCY2";
15841    const EXTRA_CRC: u8 = 179u8;
15842    const ENCODED_LEN: usize = 42usize;
15843    fn deser(
15844        _version: MavlinkVersion,
15845        __input: &[u8],
15846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15847        let avail_len = __input.len();
15848        let mut payload_buf = [0; Self::ENCODED_LEN];
15849        let mut buf = if avail_len < Self::ENCODED_LEN {
15850            payload_buf[0..avail_len].copy_from_slice(__input);
15851            Bytes::new(&payload_buf)
15852        } else {
15853            Bytes::new(__input)
15854        };
15855        let mut __struct = Self::default();
15856        __struct.timestamp = buf.get_u32_le()?;
15857        __struct.latitude = buf.get_i32_le()?;
15858        __struct.longitude = buf.get_i32_le()?;
15859        __struct.custom_mode = buf.get_u16_le()?;
15860        __struct.altitude = buf.get_i16_le()?;
15861        __struct.target_altitude = buf.get_i16_le()?;
15862        __struct.target_distance = buf.get_u16_le()?;
15863        __struct.wp_num = buf.get_u16_le()?;
15864        let tmp = buf.get_u16_le()?;
15865        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15866            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15867                flag_type: "HlFailureFlag",
15868                value: tmp as u64,
15869            })?;
15870        let tmp = buf.get_u8()?;
15871        __struct.mavtype =
15872            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15873                enum_type: "MavType",
15874                value: tmp as u64,
15875            })?;
15876        let tmp = buf.get_u8()?;
15877        __struct.autopilot =
15878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15879                enum_type: "MavAutopilot",
15880                value: tmp as u64,
15881            })?;
15882        __struct.heading = buf.get_u8()?;
15883        __struct.target_heading = buf.get_u8()?;
15884        __struct.throttle = buf.get_u8()?;
15885        __struct.airspeed = buf.get_u8()?;
15886        __struct.airspeed_sp = buf.get_u8()?;
15887        __struct.groundspeed = buf.get_u8()?;
15888        __struct.windspeed = buf.get_u8()?;
15889        __struct.wind_heading = buf.get_u8()?;
15890        __struct.eph = buf.get_u8()?;
15891        __struct.epv = buf.get_u8()?;
15892        __struct.temperature_air = buf.get_i8()?;
15893        __struct.climb_rate = buf.get_i8()?;
15894        __struct.battery = buf.get_i8()?;
15895        __struct.custom0 = buf.get_i8()?;
15896        __struct.custom1 = buf.get_i8()?;
15897        __struct.custom2 = buf.get_i8()?;
15898        Ok(__struct)
15899    }
15900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15901        let mut __tmp = BytesMut::new(bytes);
15902        #[allow(clippy::absurd_extreme_comparisons)]
15903        #[allow(unused_comparisons)]
15904        if __tmp.remaining() < Self::ENCODED_LEN {
15905            panic!(
15906                "buffer is too small (need {} bytes, but got {})",
15907                Self::ENCODED_LEN,
15908                __tmp.remaining(),
15909            )
15910        }
15911        __tmp.put_u32_le(self.timestamp);
15912        __tmp.put_i32_le(self.latitude);
15913        __tmp.put_i32_le(self.longitude);
15914        __tmp.put_u16_le(self.custom_mode);
15915        __tmp.put_i16_le(self.altitude);
15916        __tmp.put_i16_le(self.target_altitude);
15917        __tmp.put_u16_le(self.target_distance);
15918        __tmp.put_u16_le(self.wp_num);
15919        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15920        __tmp.put_u8(self.mavtype as u8);
15921        __tmp.put_u8(self.autopilot as u8);
15922        __tmp.put_u8(self.heading);
15923        __tmp.put_u8(self.target_heading);
15924        __tmp.put_u8(self.throttle);
15925        __tmp.put_u8(self.airspeed);
15926        __tmp.put_u8(self.airspeed_sp);
15927        __tmp.put_u8(self.groundspeed);
15928        __tmp.put_u8(self.windspeed);
15929        __tmp.put_u8(self.wind_heading);
15930        __tmp.put_u8(self.eph);
15931        __tmp.put_u8(self.epv);
15932        __tmp.put_i8(self.temperature_air);
15933        __tmp.put_i8(self.climb_rate);
15934        __tmp.put_i8(self.battery);
15935        __tmp.put_i8(self.custom0);
15936        __tmp.put_i8(self.custom1);
15937        __tmp.put_i8(self.custom2);
15938        if matches!(version, MavlinkVersion::V2) {
15939            let len = __tmp.len();
15940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15941        } else {
15942            __tmp.len()
15943        }
15944    }
15945}
15946#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15947#[doc = ""]
15948#[doc = "ID: 93"]
15949#[derive(Debug, Clone, PartialEq)]
15950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15952#[cfg_attr(feature = "ts", derive(TS))]
15953#[cfg_attr(feature = "ts", ts(export))]
15954pub struct HIL_ACTUATOR_CONTROLS_DATA {
15955    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15956    pub time_usec: u64,
15957    #[doc = "Flags bitmask."]
15958    pub flags: HilActuatorControlsFlags,
15959    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15961    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15962    pub controls: [f32; 16],
15963    #[doc = "System mode. Includes arming state."]
15964    pub mode: MavModeFlag,
15965}
15966impl HIL_ACTUATOR_CONTROLS_DATA {
15967    pub const ENCODED_LEN: usize = 81usize;
15968    pub const DEFAULT: Self = Self {
15969        time_usec: 0_u64,
15970        flags: HilActuatorControlsFlags::DEFAULT,
15971        controls: [0.0_f32; 16usize],
15972        mode: MavModeFlag::DEFAULT,
15973    };
15974    #[cfg(feature = "arbitrary")]
15975    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15976        use arbitrary::{Arbitrary, Unstructured};
15977        let mut buf = [0u8; 1024];
15978        rng.fill_bytes(&mut buf);
15979        let mut unstructured = Unstructured::new(&buf);
15980        Self::arbitrary(&mut unstructured).unwrap_or_default()
15981    }
15982}
15983impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15984    fn default() -> Self {
15985        Self::DEFAULT.clone()
15986    }
15987}
15988impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15989    type Message = MavMessage;
15990    const ID: u32 = 93u32;
15991    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15992    const EXTRA_CRC: u8 = 47u8;
15993    const ENCODED_LEN: usize = 81usize;
15994    fn deser(
15995        _version: MavlinkVersion,
15996        __input: &[u8],
15997    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15998        let avail_len = __input.len();
15999        let mut payload_buf = [0; Self::ENCODED_LEN];
16000        let mut buf = if avail_len < Self::ENCODED_LEN {
16001            payload_buf[0..avail_len].copy_from_slice(__input);
16002            Bytes::new(&payload_buf)
16003        } else {
16004            Bytes::new(__input)
16005        };
16006        let mut __struct = Self::default();
16007        __struct.time_usec = buf.get_u64_le()?;
16008        let tmp = buf.get_u64_le()?;
16009        __struct.flags =
16010            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16011                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16012                flag_type: "HilActuatorControlsFlags",
16013                value: tmp as u64,
16014            })?;
16015        for v in &mut __struct.controls {
16016            let val = buf.get_f32_le()?;
16017            *v = val;
16018        }
16019        let tmp = buf.get_u8()?;
16020        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16021            ::mavlink_core::error::ParserError::InvalidFlag {
16022                flag_type: "MavModeFlag",
16023                value: tmp as u64,
16024            },
16025        )?;
16026        Ok(__struct)
16027    }
16028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16029        let mut __tmp = BytesMut::new(bytes);
16030        #[allow(clippy::absurd_extreme_comparisons)]
16031        #[allow(unused_comparisons)]
16032        if __tmp.remaining() < Self::ENCODED_LEN {
16033            panic!(
16034                "buffer is too small (need {} bytes, but got {})",
16035                Self::ENCODED_LEN,
16036                __tmp.remaining(),
16037            )
16038        }
16039        __tmp.put_u64_le(self.time_usec);
16040        __tmp.put_u64_le(self.flags.bits() as u64);
16041        for val in &self.controls {
16042            __tmp.put_f32_le(*val);
16043        }
16044        __tmp.put_u8(self.mode.bits() as u8);
16045        if matches!(version, MavlinkVersion::V2) {
16046            let len = __tmp.len();
16047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16048        } else {
16049            __tmp.len()
16050        }
16051    }
16052}
16053#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16054#[doc = ""]
16055#[doc = "ID: 91"]
16056#[derive(Debug, Clone, PartialEq)]
16057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16059#[cfg_attr(feature = "ts", derive(TS))]
16060#[cfg_attr(feature = "ts", ts(export))]
16061pub struct HIL_CONTROLS_DATA {
16062    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16063    pub time_usec: u64,
16064    #[doc = "Control output -1 .. 1"]
16065    pub roll_ailerons: f32,
16066    #[doc = "Control output -1 .. 1"]
16067    pub pitch_elevator: f32,
16068    #[doc = "Control output -1 .. 1"]
16069    pub yaw_rudder: f32,
16070    #[doc = "Throttle 0 .. 1"]
16071    pub throttle: f32,
16072    #[doc = "Aux 1, -1 .. 1"]
16073    pub aux1: f32,
16074    #[doc = "Aux 2, -1 .. 1"]
16075    pub aux2: f32,
16076    #[doc = "Aux 3, -1 .. 1"]
16077    pub aux3: f32,
16078    #[doc = "Aux 4, -1 .. 1"]
16079    pub aux4: f32,
16080    #[doc = "System mode."]
16081    pub mode: MavMode,
16082    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16083    pub nav_mode: u8,
16084}
16085impl HIL_CONTROLS_DATA {
16086    pub const ENCODED_LEN: usize = 42usize;
16087    pub const DEFAULT: Self = Self {
16088        time_usec: 0_u64,
16089        roll_ailerons: 0.0_f32,
16090        pitch_elevator: 0.0_f32,
16091        yaw_rudder: 0.0_f32,
16092        throttle: 0.0_f32,
16093        aux1: 0.0_f32,
16094        aux2: 0.0_f32,
16095        aux3: 0.0_f32,
16096        aux4: 0.0_f32,
16097        mode: MavMode::DEFAULT,
16098        nav_mode: 0_u8,
16099    };
16100    #[cfg(feature = "arbitrary")]
16101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16102        use arbitrary::{Arbitrary, Unstructured};
16103        let mut buf = [0u8; 1024];
16104        rng.fill_bytes(&mut buf);
16105        let mut unstructured = Unstructured::new(&buf);
16106        Self::arbitrary(&mut unstructured).unwrap_or_default()
16107    }
16108}
16109impl Default for HIL_CONTROLS_DATA {
16110    fn default() -> Self {
16111        Self::DEFAULT.clone()
16112    }
16113}
16114impl MessageData for HIL_CONTROLS_DATA {
16115    type Message = MavMessage;
16116    const ID: u32 = 91u32;
16117    const NAME: &'static str = "HIL_CONTROLS";
16118    const EXTRA_CRC: u8 = 63u8;
16119    const ENCODED_LEN: usize = 42usize;
16120    fn deser(
16121        _version: MavlinkVersion,
16122        __input: &[u8],
16123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16124        let avail_len = __input.len();
16125        let mut payload_buf = [0; Self::ENCODED_LEN];
16126        let mut buf = if avail_len < Self::ENCODED_LEN {
16127            payload_buf[0..avail_len].copy_from_slice(__input);
16128            Bytes::new(&payload_buf)
16129        } else {
16130            Bytes::new(__input)
16131        };
16132        let mut __struct = Self::default();
16133        __struct.time_usec = buf.get_u64_le()?;
16134        __struct.roll_ailerons = buf.get_f32_le()?;
16135        __struct.pitch_elevator = buf.get_f32_le()?;
16136        __struct.yaw_rudder = buf.get_f32_le()?;
16137        __struct.throttle = buf.get_f32_le()?;
16138        __struct.aux1 = buf.get_f32_le()?;
16139        __struct.aux2 = buf.get_f32_le()?;
16140        __struct.aux3 = buf.get_f32_le()?;
16141        __struct.aux4 = buf.get_f32_le()?;
16142        let tmp = buf.get_u8()?;
16143        __struct.mode =
16144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16145                enum_type: "MavMode",
16146                value: tmp as u64,
16147            })?;
16148        __struct.nav_mode = buf.get_u8()?;
16149        Ok(__struct)
16150    }
16151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16152        let mut __tmp = BytesMut::new(bytes);
16153        #[allow(clippy::absurd_extreme_comparisons)]
16154        #[allow(unused_comparisons)]
16155        if __tmp.remaining() < Self::ENCODED_LEN {
16156            panic!(
16157                "buffer is too small (need {} bytes, but got {})",
16158                Self::ENCODED_LEN,
16159                __tmp.remaining(),
16160            )
16161        }
16162        __tmp.put_u64_le(self.time_usec);
16163        __tmp.put_f32_le(self.roll_ailerons);
16164        __tmp.put_f32_le(self.pitch_elevator);
16165        __tmp.put_f32_le(self.yaw_rudder);
16166        __tmp.put_f32_le(self.throttle);
16167        __tmp.put_f32_le(self.aux1);
16168        __tmp.put_f32_le(self.aux2);
16169        __tmp.put_f32_le(self.aux3);
16170        __tmp.put_f32_le(self.aux4);
16171        __tmp.put_u8(self.mode as u8);
16172        __tmp.put_u8(self.nav_mode);
16173        if matches!(version, MavlinkVersion::V2) {
16174            let len = __tmp.len();
16175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16176        } else {
16177            __tmp.len()
16178        }
16179    }
16180}
16181#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16182#[doc = ""]
16183#[doc = "ID: 113"]
16184#[derive(Debug, Clone, PartialEq)]
16185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16187#[cfg_attr(feature = "ts", derive(TS))]
16188#[cfg_attr(feature = "ts", ts(export))]
16189pub struct HIL_GPS_DATA {
16190    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16191    pub time_usec: u64,
16192    #[doc = "Latitude (WGS84)"]
16193    pub lat: i32,
16194    #[doc = "Longitude (WGS84)"]
16195    pub lon: i32,
16196    #[doc = "Altitude (MSL). Positive for up."]
16197    pub alt: i32,
16198    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16199    pub eph: u16,
16200    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16201    pub epv: u16,
16202    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16203    pub vel: u16,
16204    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16205    pub vn: i16,
16206    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16207    pub ve: i16,
16208    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16209    pub vd: i16,
16210    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16211    pub cog: u16,
16212    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16213    pub fix_type: u8,
16214    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16215    pub satellites_visible: u8,
16216    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16217    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16218    pub id: u8,
16219    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16220    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16221    pub yaw: u16,
16222}
16223impl HIL_GPS_DATA {
16224    pub const ENCODED_LEN: usize = 39usize;
16225    pub const DEFAULT: Self = Self {
16226        time_usec: 0_u64,
16227        lat: 0_i32,
16228        lon: 0_i32,
16229        alt: 0_i32,
16230        eph: 0_u16,
16231        epv: 0_u16,
16232        vel: 0_u16,
16233        vn: 0_i16,
16234        ve: 0_i16,
16235        vd: 0_i16,
16236        cog: 0_u16,
16237        fix_type: 0_u8,
16238        satellites_visible: 0_u8,
16239        id: 0_u8,
16240        yaw: 0_u16,
16241    };
16242    #[cfg(feature = "arbitrary")]
16243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16244        use arbitrary::{Arbitrary, Unstructured};
16245        let mut buf = [0u8; 1024];
16246        rng.fill_bytes(&mut buf);
16247        let mut unstructured = Unstructured::new(&buf);
16248        Self::arbitrary(&mut unstructured).unwrap_or_default()
16249    }
16250}
16251impl Default for HIL_GPS_DATA {
16252    fn default() -> Self {
16253        Self::DEFAULT.clone()
16254    }
16255}
16256impl MessageData for HIL_GPS_DATA {
16257    type Message = MavMessage;
16258    const ID: u32 = 113u32;
16259    const NAME: &'static str = "HIL_GPS";
16260    const EXTRA_CRC: u8 = 124u8;
16261    const ENCODED_LEN: usize = 39usize;
16262    fn deser(
16263        _version: MavlinkVersion,
16264        __input: &[u8],
16265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16266        let avail_len = __input.len();
16267        let mut payload_buf = [0; Self::ENCODED_LEN];
16268        let mut buf = if avail_len < Self::ENCODED_LEN {
16269            payload_buf[0..avail_len].copy_from_slice(__input);
16270            Bytes::new(&payload_buf)
16271        } else {
16272            Bytes::new(__input)
16273        };
16274        let mut __struct = Self::default();
16275        __struct.time_usec = buf.get_u64_le()?;
16276        __struct.lat = buf.get_i32_le()?;
16277        __struct.lon = buf.get_i32_le()?;
16278        __struct.alt = buf.get_i32_le()?;
16279        __struct.eph = buf.get_u16_le()?;
16280        __struct.epv = buf.get_u16_le()?;
16281        __struct.vel = buf.get_u16_le()?;
16282        __struct.vn = buf.get_i16_le()?;
16283        __struct.ve = buf.get_i16_le()?;
16284        __struct.vd = buf.get_i16_le()?;
16285        __struct.cog = buf.get_u16_le()?;
16286        __struct.fix_type = buf.get_u8()?;
16287        __struct.satellites_visible = buf.get_u8()?;
16288        __struct.id = buf.get_u8()?;
16289        __struct.yaw = buf.get_u16_le()?;
16290        Ok(__struct)
16291    }
16292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16293        let mut __tmp = BytesMut::new(bytes);
16294        #[allow(clippy::absurd_extreme_comparisons)]
16295        #[allow(unused_comparisons)]
16296        if __tmp.remaining() < Self::ENCODED_LEN {
16297            panic!(
16298                "buffer is too small (need {} bytes, but got {})",
16299                Self::ENCODED_LEN,
16300                __tmp.remaining(),
16301            )
16302        }
16303        __tmp.put_u64_le(self.time_usec);
16304        __tmp.put_i32_le(self.lat);
16305        __tmp.put_i32_le(self.lon);
16306        __tmp.put_i32_le(self.alt);
16307        __tmp.put_u16_le(self.eph);
16308        __tmp.put_u16_le(self.epv);
16309        __tmp.put_u16_le(self.vel);
16310        __tmp.put_i16_le(self.vn);
16311        __tmp.put_i16_le(self.ve);
16312        __tmp.put_i16_le(self.vd);
16313        __tmp.put_u16_le(self.cog);
16314        __tmp.put_u8(self.fix_type);
16315        __tmp.put_u8(self.satellites_visible);
16316        if matches!(version, MavlinkVersion::V2) {
16317            __tmp.put_u8(self.id);
16318            __tmp.put_u16_le(self.yaw);
16319            let len = __tmp.len();
16320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16321        } else {
16322            __tmp.len()
16323        }
16324    }
16325}
16326#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16327#[doc = ""]
16328#[doc = "ID: 114"]
16329#[derive(Debug, Clone, PartialEq)]
16330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16332#[cfg_attr(feature = "ts", derive(TS))]
16333#[cfg_attr(feature = "ts", ts(export))]
16334pub struct HIL_OPTICAL_FLOW_DATA {
16335    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16336    pub time_usec: u64,
16337    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16338    pub integration_time_us: u32,
16339    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16340    pub integrated_x: f32,
16341    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16342    pub integrated_y: f32,
16343    #[doc = "RH rotation around X axis"]
16344    pub integrated_xgyro: f32,
16345    #[doc = "RH rotation around Y axis"]
16346    pub integrated_ygyro: f32,
16347    #[doc = "RH rotation around Z axis"]
16348    pub integrated_zgyro: f32,
16349    #[doc = "Time since the distance was sampled."]
16350    pub time_delta_distance_us: u32,
16351    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16352    pub distance: f32,
16353    #[doc = "Temperature"]
16354    pub temperature: i16,
16355    #[doc = "Sensor ID"]
16356    pub sensor_id: u8,
16357    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16358    pub quality: u8,
16359}
16360impl HIL_OPTICAL_FLOW_DATA {
16361    pub const ENCODED_LEN: usize = 44usize;
16362    pub const DEFAULT: Self = Self {
16363        time_usec: 0_u64,
16364        integration_time_us: 0_u32,
16365        integrated_x: 0.0_f32,
16366        integrated_y: 0.0_f32,
16367        integrated_xgyro: 0.0_f32,
16368        integrated_ygyro: 0.0_f32,
16369        integrated_zgyro: 0.0_f32,
16370        time_delta_distance_us: 0_u32,
16371        distance: 0.0_f32,
16372        temperature: 0_i16,
16373        sensor_id: 0_u8,
16374        quality: 0_u8,
16375    };
16376    #[cfg(feature = "arbitrary")]
16377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16378        use arbitrary::{Arbitrary, Unstructured};
16379        let mut buf = [0u8; 1024];
16380        rng.fill_bytes(&mut buf);
16381        let mut unstructured = Unstructured::new(&buf);
16382        Self::arbitrary(&mut unstructured).unwrap_or_default()
16383    }
16384}
16385impl Default for HIL_OPTICAL_FLOW_DATA {
16386    fn default() -> Self {
16387        Self::DEFAULT.clone()
16388    }
16389}
16390impl MessageData for HIL_OPTICAL_FLOW_DATA {
16391    type Message = MavMessage;
16392    const ID: u32 = 114u32;
16393    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16394    const EXTRA_CRC: u8 = 237u8;
16395    const ENCODED_LEN: usize = 44usize;
16396    fn deser(
16397        _version: MavlinkVersion,
16398        __input: &[u8],
16399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16400        let avail_len = __input.len();
16401        let mut payload_buf = [0; Self::ENCODED_LEN];
16402        let mut buf = if avail_len < Self::ENCODED_LEN {
16403            payload_buf[0..avail_len].copy_from_slice(__input);
16404            Bytes::new(&payload_buf)
16405        } else {
16406            Bytes::new(__input)
16407        };
16408        let mut __struct = Self::default();
16409        __struct.time_usec = buf.get_u64_le()?;
16410        __struct.integration_time_us = buf.get_u32_le()?;
16411        __struct.integrated_x = buf.get_f32_le()?;
16412        __struct.integrated_y = buf.get_f32_le()?;
16413        __struct.integrated_xgyro = buf.get_f32_le()?;
16414        __struct.integrated_ygyro = buf.get_f32_le()?;
16415        __struct.integrated_zgyro = buf.get_f32_le()?;
16416        __struct.time_delta_distance_us = buf.get_u32_le()?;
16417        __struct.distance = buf.get_f32_le()?;
16418        __struct.temperature = buf.get_i16_le()?;
16419        __struct.sensor_id = buf.get_u8()?;
16420        __struct.quality = buf.get_u8()?;
16421        Ok(__struct)
16422    }
16423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16424        let mut __tmp = BytesMut::new(bytes);
16425        #[allow(clippy::absurd_extreme_comparisons)]
16426        #[allow(unused_comparisons)]
16427        if __tmp.remaining() < Self::ENCODED_LEN {
16428            panic!(
16429                "buffer is too small (need {} bytes, but got {})",
16430                Self::ENCODED_LEN,
16431                __tmp.remaining(),
16432            )
16433        }
16434        __tmp.put_u64_le(self.time_usec);
16435        __tmp.put_u32_le(self.integration_time_us);
16436        __tmp.put_f32_le(self.integrated_x);
16437        __tmp.put_f32_le(self.integrated_y);
16438        __tmp.put_f32_le(self.integrated_xgyro);
16439        __tmp.put_f32_le(self.integrated_ygyro);
16440        __tmp.put_f32_le(self.integrated_zgyro);
16441        __tmp.put_u32_le(self.time_delta_distance_us);
16442        __tmp.put_f32_le(self.distance);
16443        __tmp.put_i16_le(self.temperature);
16444        __tmp.put_u8(self.sensor_id);
16445        __tmp.put_u8(self.quality);
16446        if matches!(version, MavlinkVersion::V2) {
16447            let len = __tmp.len();
16448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16449        } else {
16450            __tmp.len()
16451        }
16452    }
16453}
16454#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16455#[doc = ""]
16456#[doc = "ID: 92"]
16457#[derive(Debug, Clone, PartialEq)]
16458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16460#[cfg_attr(feature = "ts", derive(TS))]
16461#[cfg_attr(feature = "ts", ts(export))]
16462pub struct HIL_RC_INPUTS_RAW_DATA {
16463    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16464    pub time_usec: u64,
16465    #[doc = "RC channel 1 value"]
16466    pub chan1_raw: u16,
16467    #[doc = "RC channel 2 value"]
16468    pub chan2_raw: u16,
16469    #[doc = "RC channel 3 value"]
16470    pub chan3_raw: u16,
16471    #[doc = "RC channel 4 value"]
16472    pub chan4_raw: u16,
16473    #[doc = "RC channel 5 value"]
16474    pub chan5_raw: u16,
16475    #[doc = "RC channel 6 value"]
16476    pub chan6_raw: u16,
16477    #[doc = "RC channel 7 value"]
16478    pub chan7_raw: u16,
16479    #[doc = "RC channel 8 value"]
16480    pub chan8_raw: u16,
16481    #[doc = "RC channel 9 value"]
16482    pub chan9_raw: u16,
16483    #[doc = "RC channel 10 value"]
16484    pub chan10_raw: u16,
16485    #[doc = "RC channel 11 value"]
16486    pub chan11_raw: u16,
16487    #[doc = "RC channel 12 value"]
16488    pub chan12_raw: u16,
16489    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16490    pub rssi: u8,
16491}
16492impl HIL_RC_INPUTS_RAW_DATA {
16493    pub const ENCODED_LEN: usize = 33usize;
16494    pub const DEFAULT: Self = Self {
16495        time_usec: 0_u64,
16496        chan1_raw: 0_u16,
16497        chan2_raw: 0_u16,
16498        chan3_raw: 0_u16,
16499        chan4_raw: 0_u16,
16500        chan5_raw: 0_u16,
16501        chan6_raw: 0_u16,
16502        chan7_raw: 0_u16,
16503        chan8_raw: 0_u16,
16504        chan9_raw: 0_u16,
16505        chan10_raw: 0_u16,
16506        chan11_raw: 0_u16,
16507        chan12_raw: 0_u16,
16508        rssi: 0_u8,
16509    };
16510    #[cfg(feature = "arbitrary")]
16511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16512        use arbitrary::{Arbitrary, Unstructured};
16513        let mut buf = [0u8; 1024];
16514        rng.fill_bytes(&mut buf);
16515        let mut unstructured = Unstructured::new(&buf);
16516        Self::arbitrary(&mut unstructured).unwrap_or_default()
16517    }
16518}
16519impl Default for HIL_RC_INPUTS_RAW_DATA {
16520    fn default() -> Self {
16521        Self::DEFAULT.clone()
16522    }
16523}
16524impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16525    type Message = MavMessage;
16526    const ID: u32 = 92u32;
16527    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16528    const EXTRA_CRC: u8 = 54u8;
16529    const ENCODED_LEN: usize = 33usize;
16530    fn deser(
16531        _version: MavlinkVersion,
16532        __input: &[u8],
16533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16534        let avail_len = __input.len();
16535        let mut payload_buf = [0; Self::ENCODED_LEN];
16536        let mut buf = if avail_len < Self::ENCODED_LEN {
16537            payload_buf[0..avail_len].copy_from_slice(__input);
16538            Bytes::new(&payload_buf)
16539        } else {
16540            Bytes::new(__input)
16541        };
16542        let mut __struct = Self::default();
16543        __struct.time_usec = buf.get_u64_le()?;
16544        __struct.chan1_raw = buf.get_u16_le()?;
16545        __struct.chan2_raw = buf.get_u16_le()?;
16546        __struct.chan3_raw = buf.get_u16_le()?;
16547        __struct.chan4_raw = buf.get_u16_le()?;
16548        __struct.chan5_raw = buf.get_u16_le()?;
16549        __struct.chan6_raw = buf.get_u16_le()?;
16550        __struct.chan7_raw = buf.get_u16_le()?;
16551        __struct.chan8_raw = buf.get_u16_le()?;
16552        __struct.chan9_raw = buf.get_u16_le()?;
16553        __struct.chan10_raw = buf.get_u16_le()?;
16554        __struct.chan11_raw = buf.get_u16_le()?;
16555        __struct.chan12_raw = buf.get_u16_le()?;
16556        __struct.rssi = buf.get_u8()?;
16557        Ok(__struct)
16558    }
16559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16560        let mut __tmp = BytesMut::new(bytes);
16561        #[allow(clippy::absurd_extreme_comparisons)]
16562        #[allow(unused_comparisons)]
16563        if __tmp.remaining() < Self::ENCODED_LEN {
16564            panic!(
16565                "buffer is too small (need {} bytes, but got {})",
16566                Self::ENCODED_LEN,
16567                __tmp.remaining(),
16568            )
16569        }
16570        __tmp.put_u64_le(self.time_usec);
16571        __tmp.put_u16_le(self.chan1_raw);
16572        __tmp.put_u16_le(self.chan2_raw);
16573        __tmp.put_u16_le(self.chan3_raw);
16574        __tmp.put_u16_le(self.chan4_raw);
16575        __tmp.put_u16_le(self.chan5_raw);
16576        __tmp.put_u16_le(self.chan6_raw);
16577        __tmp.put_u16_le(self.chan7_raw);
16578        __tmp.put_u16_le(self.chan8_raw);
16579        __tmp.put_u16_le(self.chan9_raw);
16580        __tmp.put_u16_le(self.chan10_raw);
16581        __tmp.put_u16_le(self.chan11_raw);
16582        __tmp.put_u16_le(self.chan12_raw);
16583        __tmp.put_u8(self.rssi);
16584        if matches!(version, MavlinkVersion::V2) {
16585            let len = __tmp.len();
16586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16587        } else {
16588            __tmp.len()
16589        }
16590    }
16591}
16592#[doc = "The IMU readings in SI units in NED body frame."]
16593#[doc = ""]
16594#[doc = "ID: 107"]
16595#[derive(Debug, Clone, PartialEq)]
16596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16598#[cfg_attr(feature = "ts", derive(TS))]
16599#[cfg_attr(feature = "ts", ts(export))]
16600pub struct HIL_SENSOR_DATA {
16601    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16602    pub time_usec: u64,
16603    #[doc = "X acceleration"]
16604    pub xacc: f32,
16605    #[doc = "Y acceleration"]
16606    pub yacc: f32,
16607    #[doc = "Z acceleration"]
16608    pub zacc: f32,
16609    #[doc = "Angular speed around X axis in body frame"]
16610    pub xgyro: f32,
16611    #[doc = "Angular speed around Y axis in body frame"]
16612    pub ygyro: f32,
16613    #[doc = "Angular speed around Z axis in body frame"]
16614    pub zgyro: f32,
16615    #[doc = "X Magnetic field"]
16616    pub xmag: f32,
16617    #[doc = "Y Magnetic field"]
16618    pub ymag: f32,
16619    #[doc = "Z Magnetic field"]
16620    pub zmag: f32,
16621    #[doc = "Absolute pressure"]
16622    pub abs_pressure: f32,
16623    #[doc = "Differential pressure (airspeed)"]
16624    pub diff_pressure: f32,
16625    #[doc = "Altitude calculated from pressure"]
16626    pub pressure_alt: f32,
16627    #[doc = "Temperature"]
16628    pub temperature: f32,
16629    #[doc = "Bitmap for fields that have updated since last message"]
16630    pub fields_updated: HilSensorUpdatedFlags,
16631    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16632    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16633    pub id: u8,
16634}
16635impl HIL_SENSOR_DATA {
16636    pub const ENCODED_LEN: usize = 65usize;
16637    pub const DEFAULT: Self = Self {
16638        time_usec: 0_u64,
16639        xacc: 0.0_f32,
16640        yacc: 0.0_f32,
16641        zacc: 0.0_f32,
16642        xgyro: 0.0_f32,
16643        ygyro: 0.0_f32,
16644        zgyro: 0.0_f32,
16645        xmag: 0.0_f32,
16646        ymag: 0.0_f32,
16647        zmag: 0.0_f32,
16648        abs_pressure: 0.0_f32,
16649        diff_pressure: 0.0_f32,
16650        pressure_alt: 0.0_f32,
16651        temperature: 0.0_f32,
16652        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16653        id: 0_u8,
16654    };
16655    #[cfg(feature = "arbitrary")]
16656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16657        use arbitrary::{Arbitrary, Unstructured};
16658        let mut buf = [0u8; 1024];
16659        rng.fill_bytes(&mut buf);
16660        let mut unstructured = Unstructured::new(&buf);
16661        Self::arbitrary(&mut unstructured).unwrap_or_default()
16662    }
16663}
16664impl Default for HIL_SENSOR_DATA {
16665    fn default() -> Self {
16666        Self::DEFAULT.clone()
16667    }
16668}
16669impl MessageData for HIL_SENSOR_DATA {
16670    type Message = MavMessage;
16671    const ID: u32 = 107u32;
16672    const NAME: &'static str = "HIL_SENSOR";
16673    const EXTRA_CRC: u8 = 108u8;
16674    const ENCODED_LEN: usize = 65usize;
16675    fn deser(
16676        _version: MavlinkVersion,
16677        __input: &[u8],
16678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16679        let avail_len = __input.len();
16680        let mut payload_buf = [0; Self::ENCODED_LEN];
16681        let mut buf = if avail_len < Self::ENCODED_LEN {
16682            payload_buf[0..avail_len].copy_from_slice(__input);
16683            Bytes::new(&payload_buf)
16684        } else {
16685            Bytes::new(__input)
16686        };
16687        let mut __struct = Self::default();
16688        __struct.time_usec = buf.get_u64_le()?;
16689        __struct.xacc = buf.get_f32_le()?;
16690        __struct.yacc = buf.get_f32_le()?;
16691        __struct.zacc = buf.get_f32_le()?;
16692        __struct.xgyro = buf.get_f32_le()?;
16693        __struct.ygyro = buf.get_f32_le()?;
16694        __struct.zgyro = buf.get_f32_le()?;
16695        __struct.xmag = buf.get_f32_le()?;
16696        __struct.ymag = buf.get_f32_le()?;
16697        __struct.zmag = buf.get_f32_le()?;
16698        __struct.abs_pressure = buf.get_f32_le()?;
16699        __struct.diff_pressure = buf.get_f32_le()?;
16700        __struct.pressure_alt = buf.get_f32_le()?;
16701        __struct.temperature = buf.get_f32_le()?;
16702        let tmp = buf.get_u32_le()?;
16703        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16704            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16705        )
16706        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16707            flag_type: "HilSensorUpdatedFlags",
16708            value: tmp as u64,
16709        })?;
16710        __struct.id = buf.get_u8()?;
16711        Ok(__struct)
16712    }
16713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16714        let mut __tmp = BytesMut::new(bytes);
16715        #[allow(clippy::absurd_extreme_comparisons)]
16716        #[allow(unused_comparisons)]
16717        if __tmp.remaining() < Self::ENCODED_LEN {
16718            panic!(
16719                "buffer is too small (need {} bytes, but got {})",
16720                Self::ENCODED_LEN,
16721                __tmp.remaining(),
16722            )
16723        }
16724        __tmp.put_u64_le(self.time_usec);
16725        __tmp.put_f32_le(self.xacc);
16726        __tmp.put_f32_le(self.yacc);
16727        __tmp.put_f32_le(self.zacc);
16728        __tmp.put_f32_le(self.xgyro);
16729        __tmp.put_f32_le(self.ygyro);
16730        __tmp.put_f32_le(self.zgyro);
16731        __tmp.put_f32_le(self.xmag);
16732        __tmp.put_f32_le(self.ymag);
16733        __tmp.put_f32_le(self.zmag);
16734        __tmp.put_f32_le(self.abs_pressure);
16735        __tmp.put_f32_le(self.diff_pressure);
16736        __tmp.put_f32_le(self.pressure_alt);
16737        __tmp.put_f32_le(self.temperature);
16738        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16739        if matches!(version, MavlinkVersion::V2) {
16740            __tmp.put_u8(self.id);
16741            let len = __tmp.len();
16742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16743        } else {
16744            __tmp.len()
16745        }
16746    }
16747}
16748#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16749#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16750#[doc = ""]
16751#[doc = "ID: 90"]
16752#[derive(Debug, Clone, PartialEq)]
16753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16755#[cfg_attr(feature = "ts", derive(TS))]
16756#[cfg_attr(feature = "ts", ts(export))]
16757pub struct HIL_STATE_DATA {
16758    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16759    pub time_usec: u64,
16760    #[doc = "Roll angle"]
16761    pub roll: f32,
16762    #[doc = "Pitch angle"]
16763    pub pitch: f32,
16764    #[doc = "Yaw angle"]
16765    pub yaw: f32,
16766    #[doc = "Body frame roll / phi angular speed"]
16767    pub rollspeed: f32,
16768    #[doc = "Body frame pitch / theta angular speed"]
16769    pub pitchspeed: f32,
16770    #[doc = "Body frame yaw / psi angular speed"]
16771    pub yawspeed: f32,
16772    #[doc = "Latitude"]
16773    pub lat: i32,
16774    #[doc = "Longitude"]
16775    pub lon: i32,
16776    #[doc = "Altitude"]
16777    pub alt: i32,
16778    #[doc = "Ground X Speed (Latitude)"]
16779    pub vx: i16,
16780    #[doc = "Ground Y Speed (Longitude)"]
16781    pub vy: i16,
16782    #[doc = "Ground Z Speed (Altitude)"]
16783    pub vz: i16,
16784    #[doc = "X acceleration"]
16785    pub xacc: i16,
16786    #[doc = "Y acceleration"]
16787    pub yacc: i16,
16788    #[doc = "Z acceleration"]
16789    pub zacc: i16,
16790}
16791impl HIL_STATE_DATA {
16792    pub const ENCODED_LEN: usize = 56usize;
16793    pub const DEFAULT: Self = Self {
16794        time_usec: 0_u64,
16795        roll: 0.0_f32,
16796        pitch: 0.0_f32,
16797        yaw: 0.0_f32,
16798        rollspeed: 0.0_f32,
16799        pitchspeed: 0.0_f32,
16800        yawspeed: 0.0_f32,
16801        lat: 0_i32,
16802        lon: 0_i32,
16803        alt: 0_i32,
16804        vx: 0_i16,
16805        vy: 0_i16,
16806        vz: 0_i16,
16807        xacc: 0_i16,
16808        yacc: 0_i16,
16809        zacc: 0_i16,
16810    };
16811    #[cfg(feature = "arbitrary")]
16812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16813        use arbitrary::{Arbitrary, Unstructured};
16814        let mut buf = [0u8; 1024];
16815        rng.fill_bytes(&mut buf);
16816        let mut unstructured = Unstructured::new(&buf);
16817        Self::arbitrary(&mut unstructured).unwrap_or_default()
16818    }
16819}
16820impl Default for HIL_STATE_DATA {
16821    fn default() -> Self {
16822        Self::DEFAULT.clone()
16823    }
16824}
16825impl MessageData for HIL_STATE_DATA {
16826    type Message = MavMessage;
16827    const ID: u32 = 90u32;
16828    const NAME: &'static str = "HIL_STATE";
16829    const EXTRA_CRC: u8 = 183u8;
16830    const ENCODED_LEN: usize = 56usize;
16831    fn deser(
16832        _version: MavlinkVersion,
16833        __input: &[u8],
16834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16835        let avail_len = __input.len();
16836        let mut payload_buf = [0; Self::ENCODED_LEN];
16837        let mut buf = if avail_len < Self::ENCODED_LEN {
16838            payload_buf[0..avail_len].copy_from_slice(__input);
16839            Bytes::new(&payload_buf)
16840        } else {
16841            Bytes::new(__input)
16842        };
16843        let mut __struct = Self::default();
16844        __struct.time_usec = buf.get_u64_le()?;
16845        __struct.roll = buf.get_f32_le()?;
16846        __struct.pitch = buf.get_f32_le()?;
16847        __struct.yaw = buf.get_f32_le()?;
16848        __struct.rollspeed = buf.get_f32_le()?;
16849        __struct.pitchspeed = buf.get_f32_le()?;
16850        __struct.yawspeed = buf.get_f32_le()?;
16851        __struct.lat = buf.get_i32_le()?;
16852        __struct.lon = buf.get_i32_le()?;
16853        __struct.alt = buf.get_i32_le()?;
16854        __struct.vx = buf.get_i16_le()?;
16855        __struct.vy = buf.get_i16_le()?;
16856        __struct.vz = buf.get_i16_le()?;
16857        __struct.xacc = buf.get_i16_le()?;
16858        __struct.yacc = buf.get_i16_le()?;
16859        __struct.zacc = buf.get_i16_le()?;
16860        Ok(__struct)
16861    }
16862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16863        let mut __tmp = BytesMut::new(bytes);
16864        #[allow(clippy::absurd_extreme_comparisons)]
16865        #[allow(unused_comparisons)]
16866        if __tmp.remaining() < Self::ENCODED_LEN {
16867            panic!(
16868                "buffer is too small (need {} bytes, but got {})",
16869                Self::ENCODED_LEN,
16870                __tmp.remaining(),
16871            )
16872        }
16873        __tmp.put_u64_le(self.time_usec);
16874        __tmp.put_f32_le(self.roll);
16875        __tmp.put_f32_le(self.pitch);
16876        __tmp.put_f32_le(self.yaw);
16877        __tmp.put_f32_le(self.rollspeed);
16878        __tmp.put_f32_le(self.pitchspeed);
16879        __tmp.put_f32_le(self.yawspeed);
16880        __tmp.put_i32_le(self.lat);
16881        __tmp.put_i32_le(self.lon);
16882        __tmp.put_i32_le(self.alt);
16883        __tmp.put_i16_le(self.vx);
16884        __tmp.put_i16_le(self.vy);
16885        __tmp.put_i16_le(self.vz);
16886        __tmp.put_i16_le(self.xacc);
16887        __tmp.put_i16_le(self.yacc);
16888        __tmp.put_i16_le(self.zacc);
16889        if matches!(version, MavlinkVersion::V2) {
16890            let len = __tmp.len();
16891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16892        } else {
16893            __tmp.len()
16894        }
16895    }
16896}
16897#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16898#[doc = ""]
16899#[doc = "ID: 115"]
16900#[derive(Debug, Clone, PartialEq)]
16901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16903#[cfg_attr(feature = "ts", derive(TS))]
16904#[cfg_attr(feature = "ts", ts(export))]
16905pub struct HIL_STATE_QUATERNION_DATA {
16906    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16907    pub time_usec: u64,
16908    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16909    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16910    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16911    pub attitude_quaternion: [f32; 4],
16912    #[doc = "Body frame roll / phi angular speed"]
16913    pub rollspeed: f32,
16914    #[doc = "Body frame pitch / theta angular speed"]
16915    pub pitchspeed: f32,
16916    #[doc = "Body frame yaw / psi angular speed"]
16917    pub yawspeed: f32,
16918    #[doc = "Latitude"]
16919    pub lat: i32,
16920    #[doc = "Longitude"]
16921    pub lon: i32,
16922    #[doc = "Altitude"]
16923    pub alt: i32,
16924    #[doc = "Ground X Speed (Latitude)"]
16925    pub vx: i16,
16926    #[doc = "Ground Y Speed (Longitude)"]
16927    pub vy: i16,
16928    #[doc = "Ground Z Speed (Altitude)"]
16929    pub vz: i16,
16930    #[doc = "Indicated airspeed"]
16931    pub ind_airspeed: u16,
16932    #[doc = "True airspeed"]
16933    pub true_airspeed: u16,
16934    #[doc = "X acceleration"]
16935    pub xacc: i16,
16936    #[doc = "Y acceleration"]
16937    pub yacc: i16,
16938    #[doc = "Z acceleration"]
16939    pub zacc: i16,
16940}
16941impl HIL_STATE_QUATERNION_DATA {
16942    pub const ENCODED_LEN: usize = 64usize;
16943    pub const DEFAULT: Self = Self {
16944        time_usec: 0_u64,
16945        attitude_quaternion: [0.0_f32; 4usize],
16946        rollspeed: 0.0_f32,
16947        pitchspeed: 0.0_f32,
16948        yawspeed: 0.0_f32,
16949        lat: 0_i32,
16950        lon: 0_i32,
16951        alt: 0_i32,
16952        vx: 0_i16,
16953        vy: 0_i16,
16954        vz: 0_i16,
16955        ind_airspeed: 0_u16,
16956        true_airspeed: 0_u16,
16957        xacc: 0_i16,
16958        yacc: 0_i16,
16959        zacc: 0_i16,
16960    };
16961    #[cfg(feature = "arbitrary")]
16962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16963        use arbitrary::{Arbitrary, Unstructured};
16964        let mut buf = [0u8; 1024];
16965        rng.fill_bytes(&mut buf);
16966        let mut unstructured = Unstructured::new(&buf);
16967        Self::arbitrary(&mut unstructured).unwrap_or_default()
16968    }
16969}
16970impl Default for HIL_STATE_QUATERNION_DATA {
16971    fn default() -> Self {
16972        Self::DEFAULT.clone()
16973    }
16974}
16975impl MessageData for HIL_STATE_QUATERNION_DATA {
16976    type Message = MavMessage;
16977    const ID: u32 = 115u32;
16978    const NAME: &'static str = "HIL_STATE_QUATERNION";
16979    const EXTRA_CRC: u8 = 4u8;
16980    const ENCODED_LEN: usize = 64usize;
16981    fn deser(
16982        _version: MavlinkVersion,
16983        __input: &[u8],
16984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16985        let avail_len = __input.len();
16986        let mut payload_buf = [0; Self::ENCODED_LEN];
16987        let mut buf = if avail_len < Self::ENCODED_LEN {
16988            payload_buf[0..avail_len].copy_from_slice(__input);
16989            Bytes::new(&payload_buf)
16990        } else {
16991            Bytes::new(__input)
16992        };
16993        let mut __struct = Self::default();
16994        __struct.time_usec = buf.get_u64_le()?;
16995        for v in &mut __struct.attitude_quaternion {
16996            let val = buf.get_f32_le()?;
16997            *v = val;
16998        }
16999        __struct.rollspeed = buf.get_f32_le()?;
17000        __struct.pitchspeed = buf.get_f32_le()?;
17001        __struct.yawspeed = buf.get_f32_le()?;
17002        __struct.lat = buf.get_i32_le()?;
17003        __struct.lon = buf.get_i32_le()?;
17004        __struct.alt = buf.get_i32_le()?;
17005        __struct.vx = buf.get_i16_le()?;
17006        __struct.vy = buf.get_i16_le()?;
17007        __struct.vz = buf.get_i16_le()?;
17008        __struct.ind_airspeed = buf.get_u16_le()?;
17009        __struct.true_airspeed = buf.get_u16_le()?;
17010        __struct.xacc = buf.get_i16_le()?;
17011        __struct.yacc = buf.get_i16_le()?;
17012        __struct.zacc = buf.get_i16_le()?;
17013        Ok(__struct)
17014    }
17015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17016        let mut __tmp = BytesMut::new(bytes);
17017        #[allow(clippy::absurd_extreme_comparisons)]
17018        #[allow(unused_comparisons)]
17019        if __tmp.remaining() < Self::ENCODED_LEN {
17020            panic!(
17021                "buffer is too small (need {} bytes, but got {})",
17022                Self::ENCODED_LEN,
17023                __tmp.remaining(),
17024            )
17025        }
17026        __tmp.put_u64_le(self.time_usec);
17027        for val in &self.attitude_quaternion {
17028            __tmp.put_f32_le(*val);
17029        }
17030        __tmp.put_f32_le(self.rollspeed);
17031        __tmp.put_f32_le(self.pitchspeed);
17032        __tmp.put_f32_le(self.yawspeed);
17033        __tmp.put_i32_le(self.lat);
17034        __tmp.put_i32_le(self.lon);
17035        __tmp.put_i32_le(self.alt);
17036        __tmp.put_i16_le(self.vx);
17037        __tmp.put_i16_le(self.vy);
17038        __tmp.put_i16_le(self.vz);
17039        __tmp.put_u16_le(self.ind_airspeed);
17040        __tmp.put_u16_le(self.true_airspeed);
17041        __tmp.put_i16_le(self.xacc);
17042        __tmp.put_i16_le(self.yacc);
17043        __tmp.put_i16_le(self.zacc);
17044        if matches!(version, MavlinkVersion::V2) {
17045            let len = __tmp.len();
17046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17047        } else {
17048            __tmp.len()
17049        }
17050    }
17051}
17052#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17053#[doc = ""]
17054#[doc = "ID: 242"]
17055#[derive(Debug, Clone, PartialEq)]
17056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17058#[cfg_attr(feature = "ts", derive(TS))]
17059#[cfg_attr(feature = "ts", ts(export))]
17060pub struct HOME_POSITION_DATA {
17061    #[doc = "Latitude (WGS84)"]
17062    pub latitude: i32,
17063    #[doc = "Longitude (WGS84)"]
17064    pub longitude: i32,
17065    #[doc = "Altitude (MSL). Positive for up."]
17066    pub altitude: i32,
17067    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17068    pub x: f32,
17069    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17070    pub y: f32,
17071    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17072    pub z: f32,
17073    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17074    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17075    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17076    pub q: [f32; 4],
17077    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17078    pub approach_x: f32,
17079    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17080    pub approach_y: f32,
17081    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17082    pub approach_z: f32,
17083    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17084    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17085    pub time_usec: u64,
17086}
17087impl HOME_POSITION_DATA {
17088    pub const ENCODED_LEN: usize = 60usize;
17089    pub const DEFAULT: Self = Self {
17090        latitude: 0_i32,
17091        longitude: 0_i32,
17092        altitude: 0_i32,
17093        x: 0.0_f32,
17094        y: 0.0_f32,
17095        z: 0.0_f32,
17096        q: [0.0_f32; 4usize],
17097        approach_x: 0.0_f32,
17098        approach_y: 0.0_f32,
17099        approach_z: 0.0_f32,
17100        time_usec: 0_u64,
17101    };
17102    #[cfg(feature = "arbitrary")]
17103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17104        use arbitrary::{Arbitrary, Unstructured};
17105        let mut buf = [0u8; 1024];
17106        rng.fill_bytes(&mut buf);
17107        let mut unstructured = Unstructured::new(&buf);
17108        Self::arbitrary(&mut unstructured).unwrap_or_default()
17109    }
17110}
17111impl Default for HOME_POSITION_DATA {
17112    fn default() -> Self {
17113        Self::DEFAULT.clone()
17114    }
17115}
17116impl MessageData for HOME_POSITION_DATA {
17117    type Message = MavMessage;
17118    const ID: u32 = 242u32;
17119    const NAME: &'static str = "HOME_POSITION";
17120    const EXTRA_CRC: u8 = 104u8;
17121    const ENCODED_LEN: usize = 60usize;
17122    fn deser(
17123        _version: MavlinkVersion,
17124        __input: &[u8],
17125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17126        let avail_len = __input.len();
17127        let mut payload_buf = [0; Self::ENCODED_LEN];
17128        let mut buf = if avail_len < Self::ENCODED_LEN {
17129            payload_buf[0..avail_len].copy_from_slice(__input);
17130            Bytes::new(&payload_buf)
17131        } else {
17132            Bytes::new(__input)
17133        };
17134        let mut __struct = Self::default();
17135        __struct.latitude = buf.get_i32_le()?;
17136        __struct.longitude = buf.get_i32_le()?;
17137        __struct.altitude = buf.get_i32_le()?;
17138        __struct.x = buf.get_f32_le()?;
17139        __struct.y = buf.get_f32_le()?;
17140        __struct.z = buf.get_f32_le()?;
17141        for v in &mut __struct.q {
17142            let val = buf.get_f32_le()?;
17143            *v = val;
17144        }
17145        __struct.approach_x = buf.get_f32_le()?;
17146        __struct.approach_y = buf.get_f32_le()?;
17147        __struct.approach_z = buf.get_f32_le()?;
17148        __struct.time_usec = buf.get_u64_le()?;
17149        Ok(__struct)
17150    }
17151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17152        let mut __tmp = BytesMut::new(bytes);
17153        #[allow(clippy::absurd_extreme_comparisons)]
17154        #[allow(unused_comparisons)]
17155        if __tmp.remaining() < Self::ENCODED_LEN {
17156            panic!(
17157                "buffer is too small (need {} bytes, but got {})",
17158                Self::ENCODED_LEN,
17159                __tmp.remaining(),
17160            )
17161        }
17162        __tmp.put_i32_le(self.latitude);
17163        __tmp.put_i32_le(self.longitude);
17164        __tmp.put_i32_le(self.altitude);
17165        __tmp.put_f32_le(self.x);
17166        __tmp.put_f32_le(self.y);
17167        __tmp.put_f32_le(self.z);
17168        for val in &self.q {
17169            __tmp.put_f32_le(*val);
17170        }
17171        __tmp.put_f32_le(self.approach_x);
17172        __tmp.put_f32_le(self.approach_y);
17173        __tmp.put_f32_le(self.approach_z);
17174        if matches!(version, MavlinkVersion::V2) {
17175            __tmp.put_u64_le(self.time_usec);
17176            let len = __tmp.len();
17177            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17178        } else {
17179            __tmp.len()
17180        }
17181    }
17182}
17183#[doc = "Temperature and humidity from hygrometer."]
17184#[doc = ""]
17185#[doc = "ID: 12920"]
17186#[derive(Debug, Clone, PartialEq)]
17187#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17189#[cfg_attr(feature = "ts", derive(TS))]
17190#[cfg_attr(feature = "ts", ts(export))]
17191pub struct HYGROMETER_SENSOR_DATA {
17192    #[doc = "Temperature"]
17193    pub temperature: i16,
17194    #[doc = "Humidity"]
17195    pub humidity: u16,
17196    #[doc = "Hygrometer ID"]
17197    pub id: u8,
17198}
17199impl HYGROMETER_SENSOR_DATA {
17200    pub const ENCODED_LEN: usize = 5usize;
17201    pub const DEFAULT: Self = Self {
17202        temperature: 0_i16,
17203        humidity: 0_u16,
17204        id: 0_u8,
17205    };
17206    #[cfg(feature = "arbitrary")]
17207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17208        use arbitrary::{Arbitrary, Unstructured};
17209        let mut buf = [0u8; 1024];
17210        rng.fill_bytes(&mut buf);
17211        let mut unstructured = Unstructured::new(&buf);
17212        Self::arbitrary(&mut unstructured).unwrap_or_default()
17213    }
17214}
17215impl Default for HYGROMETER_SENSOR_DATA {
17216    fn default() -> Self {
17217        Self::DEFAULT.clone()
17218    }
17219}
17220impl MessageData for HYGROMETER_SENSOR_DATA {
17221    type Message = MavMessage;
17222    const ID: u32 = 12920u32;
17223    const NAME: &'static str = "HYGROMETER_SENSOR";
17224    const EXTRA_CRC: u8 = 20u8;
17225    const ENCODED_LEN: usize = 5usize;
17226    fn deser(
17227        _version: MavlinkVersion,
17228        __input: &[u8],
17229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17230        let avail_len = __input.len();
17231        let mut payload_buf = [0; Self::ENCODED_LEN];
17232        let mut buf = if avail_len < Self::ENCODED_LEN {
17233            payload_buf[0..avail_len].copy_from_slice(__input);
17234            Bytes::new(&payload_buf)
17235        } else {
17236            Bytes::new(__input)
17237        };
17238        let mut __struct = Self::default();
17239        __struct.temperature = buf.get_i16_le()?;
17240        __struct.humidity = buf.get_u16_le()?;
17241        __struct.id = buf.get_u8()?;
17242        Ok(__struct)
17243    }
17244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17245        let mut __tmp = BytesMut::new(bytes);
17246        #[allow(clippy::absurd_extreme_comparisons)]
17247        #[allow(unused_comparisons)]
17248        if __tmp.remaining() < Self::ENCODED_LEN {
17249            panic!(
17250                "buffer is too small (need {} bytes, but got {})",
17251                Self::ENCODED_LEN,
17252                __tmp.remaining(),
17253            )
17254        }
17255        __tmp.put_i16_le(self.temperature);
17256        __tmp.put_u16_le(self.humidity);
17257        __tmp.put_u8(self.id);
17258        if matches!(version, MavlinkVersion::V2) {
17259            let len = __tmp.len();
17260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17261        } else {
17262            __tmp.len()
17263        }
17264    }
17265}
17266#[doc = "Illuminator status."]
17267#[doc = ""]
17268#[doc = "ID: 440"]
17269#[derive(Debug, Clone, PartialEq)]
17270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17272#[cfg_attr(feature = "ts", derive(TS))]
17273#[cfg_attr(feature = "ts", ts(export))]
17274pub struct ILLUMINATOR_STATUS_DATA {
17275    #[doc = "Time since the start-up of the illuminator in ms"]
17276    pub uptime_ms: u32,
17277    #[doc = "Errors"]
17278    pub error_status: IlluminatorErrorFlags,
17279    #[doc = "Illuminator brightness"]
17280    pub brightness: f32,
17281    #[doc = "Illuminator strobing period in seconds"]
17282    pub strobe_period: f32,
17283    #[doc = "Illuminator strobing duty cycle"]
17284    pub strobe_duty_cycle: f32,
17285    #[doc = "Temperature in Celsius"]
17286    pub temp_c: f32,
17287    #[doc = "Minimum strobing period in seconds"]
17288    pub min_strobe_period: f32,
17289    #[doc = "Maximum strobing period in seconds"]
17290    pub max_strobe_period: f32,
17291    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17292    pub enable: u8,
17293    #[doc = "Supported illuminator modes"]
17294    pub mode_bitmask: IlluminatorMode,
17295    #[doc = "Illuminator mode"]
17296    pub mode: IlluminatorMode,
17297}
17298impl ILLUMINATOR_STATUS_DATA {
17299    pub const ENCODED_LEN: usize = 35usize;
17300    pub const DEFAULT: Self = Self {
17301        uptime_ms: 0_u32,
17302        error_status: IlluminatorErrorFlags::DEFAULT,
17303        brightness: 0.0_f32,
17304        strobe_period: 0.0_f32,
17305        strobe_duty_cycle: 0.0_f32,
17306        temp_c: 0.0_f32,
17307        min_strobe_period: 0.0_f32,
17308        max_strobe_period: 0.0_f32,
17309        enable: 0_u8,
17310        mode_bitmask: IlluminatorMode::DEFAULT,
17311        mode: IlluminatorMode::DEFAULT,
17312    };
17313    #[cfg(feature = "arbitrary")]
17314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17315        use arbitrary::{Arbitrary, Unstructured};
17316        let mut buf = [0u8; 1024];
17317        rng.fill_bytes(&mut buf);
17318        let mut unstructured = Unstructured::new(&buf);
17319        Self::arbitrary(&mut unstructured).unwrap_or_default()
17320    }
17321}
17322impl Default for ILLUMINATOR_STATUS_DATA {
17323    fn default() -> Self {
17324        Self::DEFAULT.clone()
17325    }
17326}
17327impl MessageData for ILLUMINATOR_STATUS_DATA {
17328    type Message = MavMessage;
17329    const ID: u32 = 440u32;
17330    const NAME: &'static str = "ILLUMINATOR_STATUS";
17331    const EXTRA_CRC: u8 = 66u8;
17332    const ENCODED_LEN: usize = 35usize;
17333    fn deser(
17334        _version: MavlinkVersion,
17335        __input: &[u8],
17336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17337        let avail_len = __input.len();
17338        let mut payload_buf = [0; Self::ENCODED_LEN];
17339        let mut buf = if avail_len < Self::ENCODED_LEN {
17340            payload_buf[0..avail_len].copy_from_slice(__input);
17341            Bytes::new(&payload_buf)
17342        } else {
17343            Bytes::new(__input)
17344        };
17345        let mut __struct = Self::default();
17346        __struct.uptime_ms = buf.get_u32_le()?;
17347        let tmp = buf.get_u32_le()?;
17348        __struct.error_status = IlluminatorErrorFlags::from_bits(
17349            tmp as <IlluminatorErrorFlags as Flags>::Bits,
17350        )
17351        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17352            flag_type: "IlluminatorErrorFlags",
17353            value: tmp as u64,
17354        })?;
17355        __struct.brightness = buf.get_f32_le()?;
17356        __struct.strobe_period = buf.get_f32_le()?;
17357        __struct.strobe_duty_cycle = buf.get_f32_le()?;
17358        __struct.temp_c = buf.get_f32_le()?;
17359        __struct.min_strobe_period = buf.get_f32_le()?;
17360        __struct.max_strobe_period = buf.get_f32_le()?;
17361        __struct.enable = buf.get_u8()?;
17362        let tmp = buf.get_u8()?;
17363        __struct.mode_bitmask =
17364            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17365                enum_type: "IlluminatorMode",
17366                value: tmp as u64,
17367            })?;
17368        let tmp = buf.get_u8()?;
17369        __struct.mode =
17370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17371                enum_type: "IlluminatorMode",
17372                value: tmp as u64,
17373            })?;
17374        Ok(__struct)
17375    }
17376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17377        let mut __tmp = BytesMut::new(bytes);
17378        #[allow(clippy::absurd_extreme_comparisons)]
17379        #[allow(unused_comparisons)]
17380        if __tmp.remaining() < Self::ENCODED_LEN {
17381            panic!(
17382                "buffer is too small (need {} bytes, but got {})",
17383                Self::ENCODED_LEN,
17384                __tmp.remaining(),
17385            )
17386        }
17387        __tmp.put_u32_le(self.uptime_ms);
17388        __tmp.put_u32_le(self.error_status.bits() as u32);
17389        __tmp.put_f32_le(self.brightness);
17390        __tmp.put_f32_le(self.strobe_period);
17391        __tmp.put_f32_le(self.strobe_duty_cycle);
17392        __tmp.put_f32_le(self.temp_c);
17393        __tmp.put_f32_le(self.min_strobe_period);
17394        __tmp.put_f32_le(self.max_strobe_period);
17395        __tmp.put_u8(self.enable);
17396        __tmp.put_u8(self.mode_bitmask as u8);
17397        __tmp.put_u8(self.mode as u8);
17398        if matches!(version, MavlinkVersion::V2) {
17399            let len = __tmp.len();
17400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17401        } else {
17402            __tmp.len()
17403        }
17404    }
17405}
17406#[doc = "Status of the Iridium SBD link."]
17407#[doc = ""]
17408#[doc = "ID: 335"]
17409#[derive(Debug, Clone, PartialEq)]
17410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17412#[cfg_attr(feature = "ts", derive(TS))]
17413#[cfg_attr(feature = "ts", ts(export))]
17414pub struct ISBD_LINK_STATUS_DATA {
17415    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17416    pub timestamp: u64,
17417    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17418    pub last_heartbeat: u64,
17419    #[doc = "Number of failed SBD sessions."]
17420    pub failed_sessions: u16,
17421    #[doc = "Number of successful SBD sessions."]
17422    pub successful_sessions: u16,
17423    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17424    pub signal_quality: u8,
17425    #[doc = "1: Ring call pending, 0: No call pending."]
17426    pub ring_pending: u8,
17427    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17428    pub tx_session_pending: u8,
17429    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17430    pub rx_session_pending: u8,
17431}
17432impl ISBD_LINK_STATUS_DATA {
17433    pub const ENCODED_LEN: usize = 24usize;
17434    pub const DEFAULT: Self = Self {
17435        timestamp: 0_u64,
17436        last_heartbeat: 0_u64,
17437        failed_sessions: 0_u16,
17438        successful_sessions: 0_u16,
17439        signal_quality: 0_u8,
17440        ring_pending: 0_u8,
17441        tx_session_pending: 0_u8,
17442        rx_session_pending: 0_u8,
17443    };
17444    #[cfg(feature = "arbitrary")]
17445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17446        use arbitrary::{Arbitrary, Unstructured};
17447        let mut buf = [0u8; 1024];
17448        rng.fill_bytes(&mut buf);
17449        let mut unstructured = Unstructured::new(&buf);
17450        Self::arbitrary(&mut unstructured).unwrap_or_default()
17451    }
17452}
17453impl Default for ISBD_LINK_STATUS_DATA {
17454    fn default() -> Self {
17455        Self::DEFAULT.clone()
17456    }
17457}
17458impl MessageData for ISBD_LINK_STATUS_DATA {
17459    type Message = MavMessage;
17460    const ID: u32 = 335u32;
17461    const NAME: &'static str = "ISBD_LINK_STATUS";
17462    const EXTRA_CRC: u8 = 225u8;
17463    const ENCODED_LEN: usize = 24usize;
17464    fn deser(
17465        _version: MavlinkVersion,
17466        __input: &[u8],
17467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17468        let avail_len = __input.len();
17469        let mut payload_buf = [0; Self::ENCODED_LEN];
17470        let mut buf = if avail_len < Self::ENCODED_LEN {
17471            payload_buf[0..avail_len].copy_from_slice(__input);
17472            Bytes::new(&payload_buf)
17473        } else {
17474            Bytes::new(__input)
17475        };
17476        let mut __struct = Self::default();
17477        __struct.timestamp = buf.get_u64_le()?;
17478        __struct.last_heartbeat = buf.get_u64_le()?;
17479        __struct.failed_sessions = buf.get_u16_le()?;
17480        __struct.successful_sessions = buf.get_u16_le()?;
17481        __struct.signal_quality = buf.get_u8()?;
17482        __struct.ring_pending = buf.get_u8()?;
17483        __struct.tx_session_pending = buf.get_u8()?;
17484        __struct.rx_session_pending = buf.get_u8()?;
17485        Ok(__struct)
17486    }
17487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17488        let mut __tmp = BytesMut::new(bytes);
17489        #[allow(clippy::absurd_extreme_comparisons)]
17490        #[allow(unused_comparisons)]
17491        if __tmp.remaining() < Self::ENCODED_LEN {
17492            panic!(
17493                "buffer is too small (need {} bytes, but got {})",
17494                Self::ENCODED_LEN,
17495                __tmp.remaining(),
17496            )
17497        }
17498        __tmp.put_u64_le(self.timestamp);
17499        __tmp.put_u64_le(self.last_heartbeat);
17500        __tmp.put_u16_le(self.failed_sessions);
17501        __tmp.put_u16_le(self.successful_sessions);
17502        __tmp.put_u8(self.signal_quality);
17503        __tmp.put_u8(self.ring_pending);
17504        __tmp.put_u8(self.tx_session_pending);
17505        __tmp.put_u8(self.rx_session_pending);
17506        if matches!(version, MavlinkVersion::V2) {
17507            let len = __tmp.len();
17508            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17509        } else {
17510            __tmp.len()
17511        }
17512    }
17513}
17514#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17515#[doc = ""]
17516#[doc = "ID: 149"]
17517#[derive(Debug, Clone, PartialEq)]
17518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17520#[cfg_attr(feature = "ts", derive(TS))]
17521#[cfg_attr(feature = "ts", ts(export))]
17522pub struct LANDING_TARGET_DATA {
17523    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17524    pub time_usec: u64,
17525    #[doc = "X-axis angular offset of the target from the center of the image"]
17526    pub angle_x: f32,
17527    #[doc = "Y-axis angular offset of the target from the center of the image"]
17528    pub angle_y: f32,
17529    #[doc = "Distance to the target from the vehicle"]
17530    pub distance: f32,
17531    #[doc = "Size of target along x-axis"]
17532    pub size_x: f32,
17533    #[doc = "Size of target along y-axis"]
17534    pub size_y: f32,
17535    #[doc = "The ID of the target if multiple targets are present"]
17536    pub target_num: u8,
17537    #[doc = "Coordinate frame used for following fields."]
17538    pub frame: MavFrame,
17539    #[doc = "X Position of the landing target in MAV_FRAME"]
17540    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17541    pub x: f32,
17542    #[doc = "Y Position of the landing target in MAV_FRAME"]
17543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17544    pub y: f32,
17545    #[doc = "Z Position of the landing target in MAV_FRAME"]
17546    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17547    pub z: f32,
17548    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17549    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17550    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17551    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17552    pub q: [f32; 4],
17553    #[doc = "Type of landing target"]
17554    #[cfg_attr(feature = "serde", serde(default))]
17555    pub mavtype: LandingTargetType,
17556    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17557    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17558    pub position_valid: u8,
17559}
17560impl LANDING_TARGET_DATA {
17561    pub const ENCODED_LEN: usize = 60usize;
17562    pub const DEFAULT: Self = Self {
17563        time_usec: 0_u64,
17564        angle_x: 0.0_f32,
17565        angle_y: 0.0_f32,
17566        distance: 0.0_f32,
17567        size_x: 0.0_f32,
17568        size_y: 0.0_f32,
17569        target_num: 0_u8,
17570        frame: MavFrame::DEFAULT,
17571        x: 0.0_f32,
17572        y: 0.0_f32,
17573        z: 0.0_f32,
17574        q: [0.0_f32; 4usize],
17575        mavtype: LandingTargetType::DEFAULT,
17576        position_valid: 0_u8,
17577    };
17578    #[cfg(feature = "arbitrary")]
17579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17580        use arbitrary::{Arbitrary, Unstructured};
17581        let mut buf = [0u8; 1024];
17582        rng.fill_bytes(&mut buf);
17583        let mut unstructured = Unstructured::new(&buf);
17584        Self::arbitrary(&mut unstructured).unwrap_or_default()
17585    }
17586}
17587impl Default for LANDING_TARGET_DATA {
17588    fn default() -> Self {
17589        Self::DEFAULT.clone()
17590    }
17591}
17592impl MessageData for LANDING_TARGET_DATA {
17593    type Message = MavMessage;
17594    const ID: u32 = 149u32;
17595    const NAME: &'static str = "LANDING_TARGET";
17596    const EXTRA_CRC: u8 = 200u8;
17597    const ENCODED_LEN: usize = 60usize;
17598    fn deser(
17599        _version: MavlinkVersion,
17600        __input: &[u8],
17601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17602        let avail_len = __input.len();
17603        let mut payload_buf = [0; Self::ENCODED_LEN];
17604        let mut buf = if avail_len < Self::ENCODED_LEN {
17605            payload_buf[0..avail_len].copy_from_slice(__input);
17606            Bytes::new(&payload_buf)
17607        } else {
17608            Bytes::new(__input)
17609        };
17610        let mut __struct = Self::default();
17611        __struct.time_usec = buf.get_u64_le()?;
17612        __struct.angle_x = buf.get_f32_le()?;
17613        __struct.angle_y = buf.get_f32_le()?;
17614        __struct.distance = buf.get_f32_le()?;
17615        __struct.size_x = buf.get_f32_le()?;
17616        __struct.size_y = buf.get_f32_le()?;
17617        __struct.target_num = buf.get_u8()?;
17618        let tmp = buf.get_u8()?;
17619        __struct.frame =
17620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17621                enum_type: "MavFrame",
17622                value: tmp as u64,
17623            })?;
17624        __struct.x = buf.get_f32_le()?;
17625        __struct.y = buf.get_f32_le()?;
17626        __struct.z = buf.get_f32_le()?;
17627        for v in &mut __struct.q {
17628            let val = buf.get_f32_le()?;
17629            *v = val;
17630        }
17631        let tmp = buf.get_u8()?;
17632        __struct.mavtype =
17633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17634                enum_type: "LandingTargetType",
17635                value: tmp as u64,
17636            })?;
17637        __struct.position_valid = buf.get_u8()?;
17638        Ok(__struct)
17639    }
17640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17641        let mut __tmp = BytesMut::new(bytes);
17642        #[allow(clippy::absurd_extreme_comparisons)]
17643        #[allow(unused_comparisons)]
17644        if __tmp.remaining() < Self::ENCODED_LEN {
17645            panic!(
17646                "buffer is too small (need {} bytes, but got {})",
17647                Self::ENCODED_LEN,
17648                __tmp.remaining(),
17649            )
17650        }
17651        __tmp.put_u64_le(self.time_usec);
17652        __tmp.put_f32_le(self.angle_x);
17653        __tmp.put_f32_le(self.angle_y);
17654        __tmp.put_f32_le(self.distance);
17655        __tmp.put_f32_le(self.size_x);
17656        __tmp.put_f32_le(self.size_y);
17657        __tmp.put_u8(self.target_num);
17658        __tmp.put_u8(self.frame as u8);
17659        if matches!(version, MavlinkVersion::V2) {
17660            __tmp.put_f32_le(self.x);
17661            __tmp.put_f32_le(self.y);
17662            __tmp.put_f32_le(self.z);
17663            for val in &self.q {
17664                __tmp.put_f32_le(*val);
17665            }
17666            __tmp.put_u8(self.mavtype as u8);
17667            __tmp.put_u8(self.position_valid);
17668            let len = __tmp.len();
17669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17670        } else {
17671            __tmp.len()
17672        }
17673    }
17674}
17675#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17676#[doc = ""]
17677#[doc = "ID: 8"]
17678#[derive(Debug, Clone, PartialEq)]
17679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17681#[cfg_attr(feature = "ts", derive(TS))]
17682#[cfg_attr(feature = "ts", ts(export))]
17683pub struct LINK_NODE_STATUS_DATA {
17684    #[doc = "Timestamp (time since system boot)."]
17685    pub timestamp: u64,
17686    #[doc = "Transmit rate"]
17687    pub tx_rate: u32,
17688    #[doc = "Receive rate"]
17689    pub rx_rate: u32,
17690    #[doc = "Messages sent"]
17691    pub messages_sent: u32,
17692    #[doc = "Messages received (estimated from counting seq)"]
17693    pub messages_received: u32,
17694    #[doc = "Messages lost (estimated from counting seq)"]
17695    pub messages_lost: u32,
17696    #[doc = "Number of bytes that could not be parsed correctly."]
17697    pub rx_parse_err: u16,
17698    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17699    pub tx_overflows: u16,
17700    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17701    pub rx_overflows: u16,
17702    #[doc = "Remaining free transmit buffer space"]
17703    pub tx_buf: u8,
17704    #[doc = "Remaining free receive buffer space"]
17705    pub rx_buf: u8,
17706}
17707impl LINK_NODE_STATUS_DATA {
17708    pub const ENCODED_LEN: usize = 36usize;
17709    pub const DEFAULT: Self = Self {
17710        timestamp: 0_u64,
17711        tx_rate: 0_u32,
17712        rx_rate: 0_u32,
17713        messages_sent: 0_u32,
17714        messages_received: 0_u32,
17715        messages_lost: 0_u32,
17716        rx_parse_err: 0_u16,
17717        tx_overflows: 0_u16,
17718        rx_overflows: 0_u16,
17719        tx_buf: 0_u8,
17720        rx_buf: 0_u8,
17721    };
17722    #[cfg(feature = "arbitrary")]
17723    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17724        use arbitrary::{Arbitrary, Unstructured};
17725        let mut buf = [0u8; 1024];
17726        rng.fill_bytes(&mut buf);
17727        let mut unstructured = Unstructured::new(&buf);
17728        Self::arbitrary(&mut unstructured).unwrap_or_default()
17729    }
17730}
17731impl Default for LINK_NODE_STATUS_DATA {
17732    fn default() -> Self {
17733        Self::DEFAULT.clone()
17734    }
17735}
17736impl MessageData for LINK_NODE_STATUS_DATA {
17737    type Message = MavMessage;
17738    const ID: u32 = 8u32;
17739    const NAME: &'static str = "LINK_NODE_STATUS";
17740    const EXTRA_CRC: u8 = 117u8;
17741    const ENCODED_LEN: usize = 36usize;
17742    fn deser(
17743        _version: MavlinkVersion,
17744        __input: &[u8],
17745    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17746        let avail_len = __input.len();
17747        let mut payload_buf = [0; Self::ENCODED_LEN];
17748        let mut buf = if avail_len < Self::ENCODED_LEN {
17749            payload_buf[0..avail_len].copy_from_slice(__input);
17750            Bytes::new(&payload_buf)
17751        } else {
17752            Bytes::new(__input)
17753        };
17754        let mut __struct = Self::default();
17755        __struct.timestamp = buf.get_u64_le()?;
17756        __struct.tx_rate = buf.get_u32_le()?;
17757        __struct.rx_rate = buf.get_u32_le()?;
17758        __struct.messages_sent = buf.get_u32_le()?;
17759        __struct.messages_received = buf.get_u32_le()?;
17760        __struct.messages_lost = buf.get_u32_le()?;
17761        __struct.rx_parse_err = buf.get_u16_le()?;
17762        __struct.tx_overflows = buf.get_u16_le()?;
17763        __struct.rx_overflows = buf.get_u16_le()?;
17764        __struct.tx_buf = buf.get_u8()?;
17765        __struct.rx_buf = buf.get_u8()?;
17766        Ok(__struct)
17767    }
17768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17769        let mut __tmp = BytesMut::new(bytes);
17770        #[allow(clippy::absurd_extreme_comparisons)]
17771        #[allow(unused_comparisons)]
17772        if __tmp.remaining() < Self::ENCODED_LEN {
17773            panic!(
17774                "buffer is too small (need {} bytes, but got {})",
17775                Self::ENCODED_LEN,
17776                __tmp.remaining(),
17777            )
17778        }
17779        __tmp.put_u64_le(self.timestamp);
17780        __tmp.put_u32_le(self.tx_rate);
17781        __tmp.put_u32_le(self.rx_rate);
17782        __tmp.put_u32_le(self.messages_sent);
17783        __tmp.put_u32_le(self.messages_received);
17784        __tmp.put_u32_le(self.messages_lost);
17785        __tmp.put_u16_le(self.rx_parse_err);
17786        __tmp.put_u16_le(self.tx_overflows);
17787        __tmp.put_u16_le(self.rx_overflows);
17788        __tmp.put_u8(self.tx_buf);
17789        __tmp.put_u8(self.rx_buf);
17790        if matches!(version, MavlinkVersion::V2) {
17791            let len = __tmp.len();
17792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17793        } else {
17794            __tmp.len()
17795        }
17796    }
17797}
17798#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17799#[doc = ""]
17800#[doc = "ID: 32"]
17801#[derive(Debug, Clone, PartialEq)]
17802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17804#[cfg_attr(feature = "ts", derive(TS))]
17805#[cfg_attr(feature = "ts", ts(export))]
17806pub struct LOCAL_POSITION_NED_DATA {
17807    #[doc = "Timestamp (time since system boot)."]
17808    pub time_boot_ms: u32,
17809    #[doc = "X Position"]
17810    pub x: f32,
17811    #[doc = "Y Position"]
17812    pub y: f32,
17813    #[doc = "Z Position"]
17814    pub z: f32,
17815    #[doc = "X Speed"]
17816    pub vx: f32,
17817    #[doc = "Y Speed"]
17818    pub vy: f32,
17819    #[doc = "Z Speed"]
17820    pub vz: f32,
17821}
17822impl LOCAL_POSITION_NED_DATA {
17823    pub const ENCODED_LEN: usize = 28usize;
17824    pub const DEFAULT: Self = Self {
17825        time_boot_ms: 0_u32,
17826        x: 0.0_f32,
17827        y: 0.0_f32,
17828        z: 0.0_f32,
17829        vx: 0.0_f32,
17830        vy: 0.0_f32,
17831        vz: 0.0_f32,
17832    };
17833    #[cfg(feature = "arbitrary")]
17834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17835        use arbitrary::{Arbitrary, Unstructured};
17836        let mut buf = [0u8; 1024];
17837        rng.fill_bytes(&mut buf);
17838        let mut unstructured = Unstructured::new(&buf);
17839        Self::arbitrary(&mut unstructured).unwrap_or_default()
17840    }
17841}
17842impl Default for LOCAL_POSITION_NED_DATA {
17843    fn default() -> Self {
17844        Self::DEFAULT.clone()
17845    }
17846}
17847impl MessageData for LOCAL_POSITION_NED_DATA {
17848    type Message = MavMessage;
17849    const ID: u32 = 32u32;
17850    const NAME: &'static str = "LOCAL_POSITION_NED";
17851    const EXTRA_CRC: u8 = 185u8;
17852    const ENCODED_LEN: usize = 28usize;
17853    fn deser(
17854        _version: MavlinkVersion,
17855        __input: &[u8],
17856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17857        let avail_len = __input.len();
17858        let mut payload_buf = [0; Self::ENCODED_LEN];
17859        let mut buf = if avail_len < Self::ENCODED_LEN {
17860            payload_buf[0..avail_len].copy_from_slice(__input);
17861            Bytes::new(&payload_buf)
17862        } else {
17863            Bytes::new(__input)
17864        };
17865        let mut __struct = Self::default();
17866        __struct.time_boot_ms = buf.get_u32_le()?;
17867        __struct.x = buf.get_f32_le()?;
17868        __struct.y = buf.get_f32_le()?;
17869        __struct.z = buf.get_f32_le()?;
17870        __struct.vx = buf.get_f32_le()?;
17871        __struct.vy = buf.get_f32_le()?;
17872        __struct.vz = buf.get_f32_le()?;
17873        Ok(__struct)
17874    }
17875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17876        let mut __tmp = BytesMut::new(bytes);
17877        #[allow(clippy::absurd_extreme_comparisons)]
17878        #[allow(unused_comparisons)]
17879        if __tmp.remaining() < Self::ENCODED_LEN {
17880            panic!(
17881                "buffer is too small (need {} bytes, but got {})",
17882                Self::ENCODED_LEN,
17883                __tmp.remaining(),
17884            )
17885        }
17886        __tmp.put_u32_le(self.time_boot_ms);
17887        __tmp.put_f32_le(self.x);
17888        __tmp.put_f32_le(self.y);
17889        __tmp.put_f32_le(self.z);
17890        __tmp.put_f32_le(self.vx);
17891        __tmp.put_f32_le(self.vy);
17892        __tmp.put_f32_le(self.vz);
17893        if matches!(version, MavlinkVersion::V2) {
17894            let len = __tmp.len();
17895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17896        } else {
17897            __tmp.len()
17898        }
17899    }
17900}
17901#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17902#[doc = ""]
17903#[doc = "ID: 64"]
17904#[derive(Debug, Clone, PartialEq)]
17905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17907#[cfg_attr(feature = "ts", derive(TS))]
17908#[cfg_attr(feature = "ts", ts(export))]
17909pub struct LOCAL_POSITION_NED_COV_DATA {
17910    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17911    pub time_usec: u64,
17912    #[doc = "X Position"]
17913    pub x: f32,
17914    #[doc = "Y Position"]
17915    pub y: f32,
17916    #[doc = "Z Position"]
17917    pub z: f32,
17918    #[doc = "X Speed"]
17919    pub vx: f32,
17920    #[doc = "Y Speed"]
17921    pub vy: f32,
17922    #[doc = "Z Speed"]
17923    pub vz: f32,
17924    #[doc = "X Acceleration"]
17925    pub ax: f32,
17926    #[doc = "Y Acceleration"]
17927    pub ay: f32,
17928    #[doc = "Z Acceleration"]
17929    pub az: f32,
17930    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17931    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17932    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17933    pub covariance: [f32; 45],
17934    #[doc = "Class id of the estimator this estimate originated from."]
17935    pub estimator_type: MavEstimatorType,
17936}
17937impl LOCAL_POSITION_NED_COV_DATA {
17938    pub const ENCODED_LEN: usize = 225usize;
17939    pub const DEFAULT: Self = Self {
17940        time_usec: 0_u64,
17941        x: 0.0_f32,
17942        y: 0.0_f32,
17943        z: 0.0_f32,
17944        vx: 0.0_f32,
17945        vy: 0.0_f32,
17946        vz: 0.0_f32,
17947        ax: 0.0_f32,
17948        ay: 0.0_f32,
17949        az: 0.0_f32,
17950        covariance: [0.0_f32; 45usize],
17951        estimator_type: MavEstimatorType::DEFAULT,
17952    };
17953    #[cfg(feature = "arbitrary")]
17954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17955        use arbitrary::{Arbitrary, Unstructured};
17956        let mut buf = [0u8; 1024];
17957        rng.fill_bytes(&mut buf);
17958        let mut unstructured = Unstructured::new(&buf);
17959        Self::arbitrary(&mut unstructured).unwrap_or_default()
17960    }
17961}
17962impl Default for LOCAL_POSITION_NED_COV_DATA {
17963    fn default() -> Self {
17964        Self::DEFAULT.clone()
17965    }
17966}
17967impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17968    type Message = MavMessage;
17969    const ID: u32 = 64u32;
17970    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17971    const EXTRA_CRC: u8 = 191u8;
17972    const ENCODED_LEN: usize = 225usize;
17973    fn deser(
17974        _version: MavlinkVersion,
17975        __input: &[u8],
17976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17977        let avail_len = __input.len();
17978        let mut payload_buf = [0; Self::ENCODED_LEN];
17979        let mut buf = if avail_len < Self::ENCODED_LEN {
17980            payload_buf[0..avail_len].copy_from_slice(__input);
17981            Bytes::new(&payload_buf)
17982        } else {
17983            Bytes::new(__input)
17984        };
17985        let mut __struct = Self::default();
17986        __struct.time_usec = buf.get_u64_le()?;
17987        __struct.x = buf.get_f32_le()?;
17988        __struct.y = buf.get_f32_le()?;
17989        __struct.z = buf.get_f32_le()?;
17990        __struct.vx = buf.get_f32_le()?;
17991        __struct.vy = buf.get_f32_le()?;
17992        __struct.vz = buf.get_f32_le()?;
17993        __struct.ax = buf.get_f32_le()?;
17994        __struct.ay = buf.get_f32_le()?;
17995        __struct.az = buf.get_f32_le()?;
17996        for v in &mut __struct.covariance {
17997            let val = buf.get_f32_le()?;
17998            *v = val;
17999        }
18000        let tmp = buf.get_u8()?;
18001        __struct.estimator_type =
18002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18003                enum_type: "MavEstimatorType",
18004                value: tmp as u64,
18005            })?;
18006        Ok(__struct)
18007    }
18008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18009        let mut __tmp = BytesMut::new(bytes);
18010        #[allow(clippy::absurd_extreme_comparisons)]
18011        #[allow(unused_comparisons)]
18012        if __tmp.remaining() < Self::ENCODED_LEN {
18013            panic!(
18014                "buffer is too small (need {} bytes, but got {})",
18015                Self::ENCODED_LEN,
18016                __tmp.remaining(),
18017            )
18018        }
18019        __tmp.put_u64_le(self.time_usec);
18020        __tmp.put_f32_le(self.x);
18021        __tmp.put_f32_le(self.y);
18022        __tmp.put_f32_le(self.z);
18023        __tmp.put_f32_le(self.vx);
18024        __tmp.put_f32_le(self.vy);
18025        __tmp.put_f32_le(self.vz);
18026        __tmp.put_f32_le(self.ax);
18027        __tmp.put_f32_le(self.ay);
18028        __tmp.put_f32_le(self.az);
18029        for val in &self.covariance {
18030            __tmp.put_f32_le(*val);
18031        }
18032        __tmp.put_u8(self.estimator_type as u8);
18033        if matches!(version, MavlinkVersion::V2) {
18034            let len = __tmp.len();
18035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18036        } else {
18037            __tmp.len()
18038        }
18039    }
18040}
18041#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18042#[doc = ""]
18043#[doc = "ID: 89"]
18044#[derive(Debug, Clone, PartialEq)]
18045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18047#[cfg_attr(feature = "ts", derive(TS))]
18048#[cfg_attr(feature = "ts", ts(export))]
18049pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18050    #[doc = "Timestamp (time since system boot)."]
18051    pub time_boot_ms: u32,
18052    #[doc = "X Position"]
18053    pub x: f32,
18054    #[doc = "Y Position"]
18055    pub y: f32,
18056    #[doc = "Z Position"]
18057    pub z: f32,
18058    #[doc = "Roll"]
18059    pub roll: f32,
18060    #[doc = "Pitch"]
18061    pub pitch: f32,
18062    #[doc = "Yaw"]
18063    pub yaw: f32,
18064}
18065impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18066    pub const ENCODED_LEN: usize = 28usize;
18067    pub const DEFAULT: Self = Self {
18068        time_boot_ms: 0_u32,
18069        x: 0.0_f32,
18070        y: 0.0_f32,
18071        z: 0.0_f32,
18072        roll: 0.0_f32,
18073        pitch: 0.0_f32,
18074        yaw: 0.0_f32,
18075    };
18076    #[cfg(feature = "arbitrary")]
18077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18078        use arbitrary::{Arbitrary, Unstructured};
18079        let mut buf = [0u8; 1024];
18080        rng.fill_bytes(&mut buf);
18081        let mut unstructured = Unstructured::new(&buf);
18082        Self::arbitrary(&mut unstructured).unwrap_or_default()
18083    }
18084}
18085impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18086    fn default() -> Self {
18087        Self::DEFAULT.clone()
18088    }
18089}
18090impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18091    type Message = MavMessage;
18092    const ID: u32 = 89u32;
18093    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18094    const EXTRA_CRC: u8 = 231u8;
18095    const ENCODED_LEN: usize = 28usize;
18096    fn deser(
18097        _version: MavlinkVersion,
18098        __input: &[u8],
18099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18100        let avail_len = __input.len();
18101        let mut payload_buf = [0; Self::ENCODED_LEN];
18102        let mut buf = if avail_len < Self::ENCODED_LEN {
18103            payload_buf[0..avail_len].copy_from_slice(__input);
18104            Bytes::new(&payload_buf)
18105        } else {
18106            Bytes::new(__input)
18107        };
18108        let mut __struct = Self::default();
18109        __struct.time_boot_ms = buf.get_u32_le()?;
18110        __struct.x = buf.get_f32_le()?;
18111        __struct.y = buf.get_f32_le()?;
18112        __struct.z = buf.get_f32_le()?;
18113        __struct.roll = buf.get_f32_le()?;
18114        __struct.pitch = buf.get_f32_le()?;
18115        __struct.yaw = buf.get_f32_le()?;
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u32_le(self.time_boot_ms);
18130        __tmp.put_f32_le(self.x);
18131        __tmp.put_f32_le(self.y);
18132        __tmp.put_f32_le(self.z);
18133        __tmp.put_f32_le(self.roll);
18134        __tmp.put_f32_le(self.pitch);
18135        __tmp.put_f32_le(self.yaw);
18136        if matches!(version, MavlinkVersion::V2) {
18137            let len = __tmp.len();
18138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18139        } else {
18140            __tmp.len()
18141        }
18142    }
18143}
18144#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18145#[doc = ""]
18146#[doc = "ID: 268"]
18147#[derive(Debug, Clone, PartialEq)]
18148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18150#[cfg_attr(feature = "ts", derive(TS))]
18151#[cfg_attr(feature = "ts", ts(export))]
18152pub struct LOGGING_ACK_DATA {
18153    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18154    pub sequence: u16,
18155    #[doc = "system ID of the target"]
18156    pub target_system: u8,
18157    #[doc = "component ID of the target"]
18158    pub target_component: u8,
18159}
18160impl LOGGING_ACK_DATA {
18161    pub const ENCODED_LEN: usize = 4usize;
18162    pub const DEFAULT: Self = Self {
18163        sequence: 0_u16,
18164        target_system: 0_u8,
18165        target_component: 0_u8,
18166    };
18167    #[cfg(feature = "arbitrary")]
18168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18169        use arbitrary::{Arbitrary, Unstructured};
18170        let mut buf = [0u8; 1024];
18171        rng.fill_bytes(&mut buf);
18172        let mut unstructured = Unstructured::new(&buf);
18173        Self::arbitrary(&mut unstructured).unwrap_or_default()
18174    }
18175}
18176impl Default for LOGGING_ACK_DATA {
18177    fn default() -> Self {
18178        Self::DEFAULT.clone()
18179    }
18180}
18181impl MessageData for LOGGING_ACK_DATA {
18182    type Message = MavMessage;
18183    const ID: u32 = 268u32;
18184    const NAME: &'static str = "LOGGING_ACK";
18185    const EXTRA_CRC: u8 = 14u8;
18186    const ENCODED_LEN: usize = 4usize;
18187    fn deser(
18188        _version: MavlinkVersion,
18189        __input: &[u8],
18190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18191        let avail_len = __input.len();
18192        let mut payload_buf = [0; Self::ENCODED_LEN];
18193        let mut buf = if avail_len < Self::ENCODED_LEN {
18194            payload_buf[0..avail_len].copy_from_slice(__input);
18195            Bytes::new(&payload_buf)
18196        } else {
18197            Bytes::new(__input)
18198        };
18199        let mut __struct = Self::default();
18200        __struct.sequence = buf.get_u16_le()?;
18201        __struct.target_system = buf.get_u8()?;
18202        __struct.target_component = buf.get_u8()?;
18203        Ok(__struct)
18204    }
18205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18206        let mut __tmp = BytesMut::new(bytes);
18207        #[allow(clippy::absurd_extreme_comparisons)]
18208        #[allow(unused_comparisons)]
18209        if __tmp.remaining() < Self::ENCODED_LEN {
18210            panic!(
18211                "buffer is too small (need {} bytes, but got {})",
18212                Self::ENCODED_LEN,
18213                __tmp.remaining(),
18214            )
18215        }
18216        __tmp.put_u16_le(self.sequence);
18217        __tmp.put_u8(self.target_system);
18218        __tmp.put_u8(self.target_component);
18219        if matches!(version, MavlinkVersion::V2) {
18220            let len = __tmp.len();
18221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18222        } else {
18223            __tmp.len()
18224        }
18225    }
18226}
18227#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18228#[doc = ""]
18229#[doc = "ID: 266"]
18230#[derive(Debug, Clone, PartialEq)]
18231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18233#[cfg_attr(feature = "ts", derive(TS))]
18234#[cfg_attr(feature = "ts", ts(export))]
18235pub struct LOGGING_DATA_DATA {
18236    #[doc = "sequence number (can wrap)"]
18237    pub sequence: u16,
18238    #[doc = "system ID of the target"]
18239    pub target_system: u8,
18240    #[doc = "component ID of the target"]
18241    pub target_component: u8,
18242    #[doc = "data length"]
18243    pub length: u8,
18244    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18245    pub first_message_offset: u8,
18246    #[doc = "logged data"]
18247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18248    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18249    pub data: [u8; 249],
18250}
18251impl LOGGING_DATA_DATA {
18252    pub const ENCODED_LEN: usize = 255usize;
18253    pub const DEFAULT: Self = Self {
18254        sequence: 0_u16,
18255        target_system: 0_u8,
18256        target_component: 0_u8,
18257        length: 0_u8,
18258        first_message_offset: 0_u8,
18259        data: [0_u8; 249usize],
18260    };
18261    #[cfg(feature = "arbitrary")]
18262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18263        use arbitrary::{Arbitrary, Unstructured};
18264        let mut buf = [0u8; 1024];
18265        rng.fill_bytes(&mut buf);
18266        let mut unstructured = Unstructured::new(&buf);
18267        Self::arbitrary(&mut unstructured).unwrap_or_default()
18268    }
18269}
18270impl Default for LOGGING_DATA_DATA {
18271    fn default() -> Self {
18272        Self::DEFAULT.clone()
18273    }
18274}
18275impl MessageData for LOGGING_DATA_DATA {
18276    type Message = MavMessage;
18277    const ID: u32 = 266u32;
18278    const NAME: &'static str = "LOGGING_DATA";
18279    const EXTRA_CRC: u8 = 193u8;
18280    const ENCODED_LEN: usize = 255usize;
18281    fn deser(
18282        _version: MavlinkVersion,
18283        __input: &[u8],
18284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18285        let avail_len = __input.len();
18286        let mut payload_buf = [0; Self::ENCODED_LEN];
18287        let mut buf = if avail_len < Self::ENCODED_LEN {
18288            payload_buf[0..avail_len].copy_from_slice(__input);
18289            Bytes::new(&payload_buf)
18290        } else {
18291            Bytes::new(__input)
18292        };
18293        let mut __struct = Self::default();
18294        __struct.sequence = buf.get_u16_le()?;
18295        __struct.target_system = buf.get_u8()?;
18296        __struct.target_component = buf.get_u8()?;
18297        __struct.length = buf.get_u8()?;
18298        __struct.first_message_offset = buf.get_u8()?;
18299        for v in &mut __struct.data {
18300            let val = buf.get_u8()?;
18301            *v = val;
18302        }
18303        Ok(__struct)
18304    }
18305    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18306        let mut __tmp = BytesMut::new(bytes);
18307        #[allow(clippy::absurd_extreme_comparisons)]
18308        #[allow(unused_comparisons)]
18309        if __tmp.remaining() < Self::ENCODED_LEN {
18310            panic!(
18311                "buffer is too small (need {} bytes, but got {})",
18312                Self::ENCODED_LEN,
18313                __tmp.remaining(),
18314            )
18315        }
18316        __tmp.put_u16_le(self.sequence);
18317        __tmp.put_u8(self.target_system);
18318        __tmp.put_u8(self.target_component);
18319        __tmp.put_u8(self.length);
18320        __tmp.put_u8(self.first_message_offset);
18321        for val in &self.data {
18322            __tmp.put_u8(*val);
18323        }
18324        if matches!(version, MavlinkVersion::V2) {
18325            let len = __tmp.len();
18326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18327        } else {
18328            __tmp.len()
18329        }
18330    }
18331}
18332#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18333#[doc = ""]
18334#[doc = "ID: 267"]
18335#[derive(Debug, Clone, PartialEq)]
18336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18338#[cfg_attr(feature = "ts", derive(TS))]
18339#[cfg_attr(feature = "ts", ts(export))]
18340pub struct LOGGING_DATA_ACKED_DATA {
18341    #[doc = "sequence number (can wrap)"]
18342    pub sequence: u16,
18343    #[doc = "system ID of the target"]
18344    pub target_system: u8,
18345    #[doc = "component ID of the target"]
18346    pub target_component: u8,
18347    #[doc = "data length"]
18348    pub length: u8,
18349    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18350    pub first_message_offset: u8,
18351    #[doc = "logged data"]
18352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18353    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18354    pub data: [u8; 249],
18355}
18356impl LOGGING_DATA_ACKED_DATA {
18357    pub const ENCODED_LEN: usize = 255usize;
18358    pub const DEFAULT: Self = Self {
18359        sequence: 0_u16,
18360        target_system: 0_u8,
18361        target_component: 0_u8,
18362        length: 0_u8,
18363        first_message_offset: 0_u8,
18364        data: [0_u8; 249usize],
18365    };
18366    #[cfg(feature = "arbitrary")]
18367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18368        use arbitrary::{Arbitrary, Unstructured};
18369        let mut buf = [0u8; 1024];
18370        rng.fill_bytes(&mut buf);
18371        let mut unstructured = Unstructured::new(&buf);
18372        Self::arbitrary(&mut unstructured).unwrap_or_default()
18373    }
18374}
18375impl Default for LOGGING_DATA_ACKED_DATA {
18376    fn default() -> Self {
18377        Self::DEFAULT.clone()
18378    }
18379}
18380impl MessageData for LOGGING_DATA_ACKED_DATA {
18381    type Message = MavMessage;
18382    const ID: u32 = 267u32;
18383    const NAME: &'static str = "LOGGING_DATA_ACKED";
18384    const EXTRA_CRC: u8 = 35u8;
18385    const ENCODED_LEN: usize = 255usize;
18386    fn deser(
18387        _version: MavlinkVersion,
18388        __input: &[u8],
18389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18390        let avail_len = __input.len();
18391        let mut payload_buf = [0; Self::ENCODED_LEN];
18392        let mut buf = if avail_len < Self::ENCODED_LEN {
18393            payload_buf[0..avail_len].copy_from_slice(__input);
18394            Bytes::new(&payload_buf)
18395        } else {
18396            Bytes::new(__input)
18397        };
18398        let mut __struct = Self::default();
18399        __struct.sequence = buf.get_u16_le()?;
18400        __struct.target_system = buf.get_u8()?;
18401        __struct.target_component = buf.get_u8()?;
18402        __struct.length = buf.get_u8()?;
18403        __struct.first_message_offset = buf.get_u8()?;
18404        for v in &mut __struct.data {
18405            let val = buf.get_u8()?;
18406            *v = val;
18407        }
18408        Ok(__struct)
18409    }
18410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18411        let mut __tmp = BytesMut::new(bytes);
18412        #[allow(clippy::absurd_extreme_comparisons)]
18413        #[allow(unused_comparisons)]
18414        if __tmp.remaining() < Self::ENCODED_LEN {
18415            panic!(
18416                "buffer is too small (need {} bytes, but got {})",
18417                Self::ENCODED_LEN,
18418                __tmp.remaining(),
18419            )
18420        }
18421        __tmp.put_u16_le(self.sequence);
18422        __tmp.put_u8(self.target_system);
18423        __tmp.put_u8(self.target_component);
18424        __tmp.put_u8(self.length);
18425        __tmp.put_u8(self.first_message_offset);
18426        for val in &self.data {
18427            __tmp.put_u8(*val);
18428        }
18429        if matches!(version, MavlinkVersion::V2) {
18430            let len = __tmp.len();
18431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18432        } else {
18433            __tmp.len()
18434        }
18435    }
18436}
18437#[doc = "Reply to LOG_REQUEST_DATA."]
18438#[doc = ""]
18439#[doc = "ID: 120"]
18440#[derive(Debug, Clone, PartialEq)]
18441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18443#[cfg_attr(feature = "ts", derive(TS))]
18444#[cfg_attr(feature = "ts", ts(export))]
18445pub struct LOG_DATA_DATA {
18446    #[doc = "Offset into the log"]
18447    pub ofs: u32,
18448    #[doc = "Log id (from LOG_ENTRY reply)"]
18449    pub id: u16,
18450    #[doc = "Number of bytes (zero for end of log)"]
18451    pub count: u8,
18452    #[doc = "log data"]
18453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18454    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18455    pub data: [u8; 90],
18456}
18457impl LOG_DATA_DATA {
18458    pub const ENCODED_LEN: usize = 97usize;
18459    pub const DEFAULT: Self = Self {
18460        ofs: 0_u32,
18461        id: 0_u16,
18462        count: 0_u8,
18463        data: [0_u8; 90usize],
18464    };
18465    #[cfg(feature = "arbitrary")]
18466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18467        use arbitrary::{Arbitrary, Unstructured};
18468        let mut buf = [0u8; 1024];
18469        rng.fill_bytes(&mut buf);
18470        let mut unstructured = Unstructured::new(&buf);
18471        Self::arbitrary(&mut unstructured).unwrap_or_default()
18472    }
18473}
18474impl Default for LOG_DATA_DATA {
18475    fn default() -> Self {
18476        Self::DEFAULT.clone()
18477    }
18478}
18479impl MessageData for LOG_DATA_DATA {
18480    type Message = MavMessage;
18481    const ID: u32 = 120u32;
18482    const NAME: &'static str = "LOG_DATA";
18483    const EXTRA_CRC: u8 = 134u8;
18484    const ENCODED_LEN: usize = 97usize;
18485    fn deser(
18486        _version: MavlinkVersion,
18487        __input: &[u8],
18488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18489        let avail_len = __input.len();
18490        let mut payload_buf = [0; Self::ENCODED_LEN];
18491        let mut buf = if avail_len < Self::ENCODED_LEN {
18492            payload_buf[0..avail_len].copy_from_slice(__input);
18493            Bytes::new(&payload_buf)
18494        } else {
18495            Bytes::new(__input)
18496        };
18497        let mut __struct = Self::default();
18498        __struct.ofs = buf.get_u32_le()?;
18499        __struct.id = buf.get_u16_le()?;
18500        __struct.count = buf.get_u8()?;
18501        for v in &mut __struct.data {
18502            let val = buf.get_u8()?;
18503            *v = val;
18504        }
18505        Ok(__struct)
18506    }
18507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18508        let mut __tmp = BytesMut::new(bytes);
18509        #[allow(clippy::absurd_extreme_comparisons)]
18510        #[allow(unused_comparisons)]
18511        if __tmp.remaining() < Self::ENCODED_LEN {
18512            panic!(
18513                "buffer is too small (need {} bytes, but got {})",
18514                Self::ENCODED_LEN,
18515                __tmp.remaining(),
18516            )
18517        }
18518        __tmp.put_u32_le(self.ofs);
18519        __tmp.put_u16_le(self.id);
18520        __tmp.put_u8(self.count);
18521        for val in &self.data {
18522            __tmp.put_u8(*val);
18523        }
18524        if matches!(version, MavlinkVersion::V2) {
18525            let len = __tmp.len();
18526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18527        } else {
18528            __tmp.len()
18529        }
18530    }
18531}
18532#[doc = "Reply to LOG_REQUEST_LIST."]
18533#[doc = ""]
18534#[doc = "ID: 118"]
18535#[derive(Debug, Clone, PartialEq)]
18536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18538#[cfg_attr(feature = "ts", derive(TS))]
18539#[cfg_attr(feature = "ts", ts(export))]
18540pub struct LOG_ENTRY_DATA {
18541    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18542    pub time_utc: u32,
18543    #[doc = "Size of the log (may be approximate)"]
18544    pub size: u32,
18545    #[doc = "Log id"]
18546    pub id: u16,
18547    #[doc = "Total number of logs"]
18548    pub num_logs: u16,
18549    #[doc = "High log number"]
18550    pub last_log_num: u16,
18551}
18552impl LOG_ENTRY_DATA {
18553    pub const ENCODED_LEN: usize = 14usize;
18554    pub const DEFAULT: Self = Self {
18555        time_utc: 0_u32,
18556        size: 0_u32,
18557        id: 0_u16,
18558        num_logs: 0_u16,
18559        last_log_num: 0_u16,
18560    };
18561    #[cfg(feature = "arbitrary")]
18562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18563        use arbitrary::{Arbitrary, Unstructured};
18564        let mut buf = [0u8; 1024];
18565        rng.fill_bytes(&mut buf);
18566        let mut unstructured = Unstructured::new(&buf);
18567        Self::arbitrary(&mut unstructured).unwrap_or_default()
18568    }
18569}
18570impl Default for LOG_ENTRY_DATA {
18571    fn default() -> Self {
18572        Self::DEFAULT.clone()
18573    }
18574}
18575impl MessageData for LOG_ENTRY_DATA {
18576    type Message = MavMessage;
18577    const ID: u32 = 118u32;
18578    const NAME: &'static str = "LOG_ENTRY";
18579    const EXTRA_CRC: u8 = 56u8;
18580    const ENCODED_LEN: usize = 14usize;
18581    fn deser(
18582        _version: MavlinkVersion,
18583        __input: &[u8],
18584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18585        let avail_len = __input.len();
18586        let mut payload_buf = [0; Self::ENCODED_LEN];
18587        let mut buf = if avail_len < Self::ENCODED_LEN {
18588            payload_buf[0..avail_len].copy_from_slice(__input);
18589            Bytes::new(&payload_buf)
18590        } else {
18591            Bytes::new(__input)
18592        };
18593        let mut __struct = Self::default();
18594        __struct.time_utc = buf.get_u32_le()?;
18595        __struct.size = buf.get_u32_le()?;
18596        __struct.id = buf.get_u16_le()?;
18597        __struct.num_logs = buf.get_u16_le()?;
18598        __struct.last_log_num = buf.get_u16_le()?;
18599        Ok(__struct)
18600    }
18601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18602        let mut __tmp = BytesMut::new(bytes);
18603        #[allow(clippy::absurd_extreme_comparisons)]
18604        #[allow(unused_comparisons)]
18605        if __tmp.remaining() < Self::ENCODED_LEN {
18606            panic!(
18607                "buffer is too small (need {} bytes, but got {})",
18608                Self::ENCODED_LEN,
18609                __tmp.remaining(),
18610            )
18611        }
18612        __tmp.put_u32_le(self.time_utc);
18613        __tmp.put_u32_le(self.size);
18614        __tmp.put_u16_le(self.id);
18615        __tmp.put_u16_le(self.num_logs);
18616        __tmp.put_u16_le(self.last_log_num);
18617        if matches!(version, MavlinkVersion::V2) {
18618            let len = __tmp.len();
18619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18620        } else {
18621            __tmp.len()
18622        }
18623    }
18624}
18625#[doc = "Erase all logs."]
18626#[doc = ""]
18627#[doc = "ID: 121"]
18628#[derive(Debug, Clone, PartialEq)]
18629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18630#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18631#[cfg_attr(feature = "ts", derive(TS))]
18632#[cfg_attr(feature = "ts", ts(export))]
18633pub struct LOG_ERASE_DATA {
18634    #[doc = "System ID"]
18635    pub target_system: u8,
18636    #[doc = "Component ID"]
18637    pub target_component: u8,
18638}
18639impl LOG_ERASE_DATA {
18640    pub const ENCODED_LEN: usize = 2usize;
18641    pub const DEFAULT: Self = Self {
18642        target_system: 0_u8,
18643        target_component: 0_u8,
18644    };
18645    #[cfg(feature = "arbitrary")]
18646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18647        use arbitrary::{Arbitrary, Unstructured};
18648        let mut buf = [0u8; 1024];
18649        rng.fill_bytes(&mut buf);
18650        let mut unstructured = Unstructured::new(&buf);
18651        Self::arbitrary(&mut unstructured).unwrap_or_default()
18652    }
18653}
18654impl Default for LOG_ERASE_DATA {
18655    fn default() -> Self {
18656        Self::DEFAULT.clone()
18657    }
18658}
18659impl MessageData for LOG_ERASE_DATA {
18660    type Message = MavMessage;
18661    const ID: u32 = 121u32;
18662    const NAME: &'static str = "LOG_ERASE";
18663    const EXTRA_CRC: u8 = 237u8;
18664    const ENCODED_LEN: usize = 2usize;
18665    fn deser(
18666        _version: MavlinkVersion,
18667        __input: &[u8],
18668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18669        let avail_len = __input.len();
18670        let mut payload_buf = [0; Self::ENCODED_LEN];
18671        let mut buf = if avail_len < Self::ENCODED_LEN {
18672            payload_buf[0..avail_len].copy_from_slice(__input);
18673            Bytes::new(&payload_buf)
18674        } else {
18675            Bytes::new(__input)
18676        };
18677        let mut __struct = Self::default();
18678        __struct.target_system = buf.get_u8()?;
18679        __struct.target_component = buf.get_u8()?;
18680        Ok(__struct)
18681    }
18682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18683        let mut __tmp = BytesMut::new(bytes);
18684        #[allow(clippy::absurd_extreme_comparisons)]
18685        #[allow(unused_comparisons)]
18686        if __tmp.remaining() < Self::ENCODED_LEN {
18687            panic!(
18688                "buffer is too small (need {} bytes, but got {})",
18689                Self::ENCODED_LEN,
18690                __tmp.remaining(),
18691            )
18692        }
18693        __tmp.put_u8(self.target_system);
18694        __tmp.put_u8(self.target_component);
18695        if matches!(version, MavlinkVersion::V2) {
18696            let len = __tmp.len();
18697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18698        } else {
18699            __tmp.len()
18700        }
18701    }
18702}
18703#[doc = "Request a chunk of a log."]
18704#[doc = ""]
18705#[doc = "ID: 119"]
18706#[derive(Debug, Clone, PartialEq)]
18707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18709#[cfg_attr(feature = "ts", derive(TS))]
18710#[cfg_attr(feature = "ts", ts(export))]
18711pub struct LOG_REQUEST_DATA_DATA {
18712    #[doc = "Offset into the log"]
18713    pub ofs: u32,
18714    #[doc = "Number of bytes"]
18715    pub count: u32,
18716    #[doc = "Log id (from LOG_ENTRY reply)"]
18717    pub id: u16,
18718    #[doc = "System ID"]
18719    pub target_system: u8,
18720    #[doc = "Component ID"]
18721    pub target_component: u8,
18722}
18723impl LOG_REQUEST_DATA_DATA {
18724    pub const ENCODED_LEN: usize = 12usize;
18725    pub const DEFAULT: Self = Self {
18726        ofs: 0_u32,
18727        count: 0_u32,
18728        id: 0_u16,
18729        target_system: 0_u8,
18730        target_component: 0_u8,
18731    };
18732    #[cfg(feature = "arbitrary")]
18733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18734        use arbitrary::{Arbitrary, Unstructured};
18735        let mut buf = [0u8; 1024];
18736        rng.fill_bytes(&mut buf);
18737        let mut unstructured = Unstructured::new(&buf);
18738        Self::arbitrary(&mut unstructured).unwrap_or_default()
18739    }
18740}
18741impl Default for LOG_REQUEST_DATA_DATA {
18742    fn default() -> Self {
18743        Self::DEFAULT.clone()
18744    }
18745}
18746impl MessageData for LOG_REQUEST_DATA_DATA {
18747    type Message = MavMessage;
18748    const ID: u32 = 119u32;
18749    const NAME: &'static str = "LOG_REQUEST_DATA";
18750    const EXTRA_CRC: u8 = 116u8;
18751    const ENCODED_LEN: usize = 12usize;
18752    fn deser(
18753        _version: MavlinkVersion,
18754        __input: &[u8],
18755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18756        let avail_len = __input.len();
18757        let mut payload_buf = [0; Self::ENCODED_LEN];
18758        let mut buf = if avail_len < Self::ENCODED_LEN {
18759            payload_buf[0..avail_len].copy_from_slice(__input);
18760            Bytes::new(&payload_buf)
18761        } else {
18762            Bytes::new(__input)
18763        };
18764        let mut __struct = Self::default();
18765        __struct.ofs = buf.get_u32_le()?;
18766        __struct.count = buf.get_u32_le()?;
18767        __struct.id = buf.get_u16_le()?;
18768        __struct.target_system = buf.get_u8()?;
18769        __struct.target_component = buf.get_u8()?;
18770        Ok(__struct)
18771    }
18772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18773        let mut __tmp = BytesMut::new(bytes);
18774        #[allow(clippy::absurd_extreme_comparisons)]
18775        #[allow(unused_comparisons)]
18776        if __tmp.remaining() < Self::ENCODED_LEN {
18777            panic!(
18778                "buffer is too small (need {} bytes, but got {})",
18779                Self::ENCODED_LEN,
18780                __tmp.remaining(),
18781            )
18782        }
18783        __tmp.put_u32_le(self.ofs);
18784        __tmp.put_u32_le(self.count);
18785        __tmp.put_u16_le(self.id);
18786        __tmp.put_u8(self.target_system);
18787        __tmp.put_u8(self.target_component);
18788        if matches!(version, MavlinkVersion::V2) {
18789            let len = __tmp.len();
18790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18791        } else {
18792            __tmp.len()
18793        }
18794    }
18795}
18796#[doc = "Stop log transfer and resume normal logging."]
18797#[doc = ""]
18798#[doc = "ID: 122"]
18799#[derive(Debug, Clone, PartialEq)]
18800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18802#[cfg_attr(feature = "ts", derive(TS))]
18803#[cfg_attr(feature = "ts", ts(export))]
18804pub struct LOG_REQUEST_END_DATA {
18805    #[doc = "System ID"]
18806    pub target_system: u8,
18807    #[doc = "Component ID"]
18808    pub target_component: u8,
18809}
18810impl LOG_REQUEST_END_DATA {
18811    pub const ENCODED_LEN: usize = 2usize;
18812    pub const DEFAULT: Self = Self {
18813        target_system: 0_u8,
18814        target_component: 0_u8,
18815    };
18816    #[cfg(feature = "arbitrary")]
18817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18818        use arbitrary::{Arbitrary, Unstructured};
18819        let mut buf = [0u8; 1024];
18820        rng.fill_bytes(&mut buf);
18821        let mut unstructured = Unstructured::new(&buf);
18822        Self::arbitrary(&mut unstructured).unwrap_or_default()
18823    }
18824}
18825impl Default for LOG_REQUEST_END_DATA {
18826    fn default() -> Self {
18827        Self::DEFAULT.clone()
18828    }
18829}
18830impl MessageData for LOG_REQUEST_END_DATA {
18831    type Message = MavMessage;
18832    const ID: u32 = 122u32;
18833    const NAME: &'static str = "LOG_REQUEST_END";
18834    const EXTRA_CRC: u8 = 203u8;
18835    const ENCODED_LEN: usize = 2usize;
18836    fn deser(
18837        _version: MavlinkVersion,
18838        __input: &[u8],
18839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18840        let avail_len = __input.len();
18841        let mut payload_buf = [0; Self::ENCODED_LEN];
18842        let mut buf = if avail_len < Self::ENCODED_LEN {
18843            payload_buf[0..avail_len].copy_from_slice(__input);
18844            Bytes::new(&payload_buf)
18845        } else {
18846            Bytes::new(__input)
18847        };
18848        let mut __struct = Self::default();
18849        __struct.target_system = buf.get_u8()?;
18850        __struct.target_component = buf.get_u8()?;
18851        Ok(__struct)
18852    }
18853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18854        let mut __tmp = BytesMut::new(bytes);
18855        #[allow(clippy::absurd_extreme_comparisons)]
18856        #[allow(unused_comparisons)]
18857        if __tmp.remaining() < Self::ENCODED_LEN {
18858            panic!(
18859                "buffer is too small (need {} bytes, but got {})",
18860                Self::ENCODED_LEN,
18861                __tmp.remaining(),
18862            )
18863        }
18864        __tmp.put_u8(self.target_system);
18865        __tmp.put_u8(self.target_component);
18866        if matches!(version, MavlinkVersion::V2) {
18867            let len = __tmp.len();
18868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18869        } else {
18870            __tmp.len()
18871        }
18872    }
18873}
18874#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18875#[doc = ""]
18876#[doc = "ID: 117"]
18877#[derive(Debug, Clone, PartialEq)]
18878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18880#[cfg_attr(feature = "ts", derive(TS))]
18881#[cfg_attr(feature = "ts", ts(export))]
18882pub struct LOG_REQUEST_LIST_DATA {
18883    #[doc = "First log id (0 for first available)"]
18884    pub start: u16,
18885    #[doc = "Last log id (0xffff for last available)"]
18886    pub end: u16,
18887    #[doc = "System ID"]
18888    pub target_system: u8,
18889    #[doc = "Component ID"]
18890    pub target_component: u8,
18891}
18892impl LOG_REQUEST_LIST_DATA {
18893    pub const ENCODED_LEN: usize = 6usize;
18894    pub const DEFAULT: Self = Self {
18895        start: 0_u16,
18896        end: 0_u16,
18897        target_system: 0_u8,
18898        target_component: 0_u8,
18899    };
18900    #[cfg(feature = "arbitrary")]
18901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18902        use arbitrary::{Arbitrary, Unstructured};
18903        let mut buf = [0u8; 1024];
18904        rng.fill_bytes(&mut buf);
18905        let mut unstructured = Unstructured::new(&buf);
18906        Self::arbitrary(&mut unstructured).unwrap_or_default()
18907    }
18908}
18909impl Default for LOG_REQUEST_LIST_DATA {
18910    fn default() -> Self {
18911        Self::DEFAULT.clone()
18912    }
18913}
18914impl MessageData for LOG_REQUEST_LIST_DATA {
18915    type Message = MavMessage;
18916    const ID: u32 = 117u32;
18917    const NAME: &'static str = "LOG_REQUEST_LIST";
18918    const EXTRA_CRC: u8 = 128u8;
18919    const ENCODED_LEN: usize = 6usize;
18920    fn deser(
18921        _version: MavlinkVersion,
18922        __input: &[u8],
18923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18924        let avail_len = __input.len();
18925        let mut payload_buf = [0; Self::ENCODED_LEN];
18926        let mut buf = if avail_len < Self::ENCODED_LEN {
18927            payload_buf[0..avail_len].copy_from_slice(__input);
18928            Bytes::new(&payload_buf)
18929        } else {
18930            Bytes::new(__input)
18931        };
18932        let mut __struct = Self::default();
18933        __struct.start = buf.get_u16_le()?;
18934        __struct.end = buf.get_u16_le()?;
18935        __struct.target_system = buf.get_u8()?;
18936        __struct.target_component = buf.get_u8()?;
18937        Ok(__struct)
18938    }
18939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18940        let mut __tmp = BytesMut::new(bytes);
18941        #[allow(clippy::absurd_extreme_comparisons)]
18942        #[allow(unused_comparisons)]
18943        if __tmp.remaining() < Self::ENCODED_LEN {
18944            panic!(
18945                "buffer is too small (need {} bytes, but got {})",
18946                Self::ENCODED_LEN,
18947                __tmp.remaining(),
18948            )
18949        }
18950        __tmp.put_u16_le(self.start);
18951        __tmp.put_u16_le(self.end);
18952        __tmp.put_u8(self.target_system);
18953        __tmp.put_u8(self.target_component);
18954        if matches!(version, MavlinkVersion::V2) {
18955            let len = __tmp.len();
18956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18957        } else {
18958            __tmp.len()
18959        }
18960    }
18961}
18962#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18963#[doc = ""]
18964#[doc = "ID: 192"]
18965#[derive(Debug, Clone, PartialEq)]
18966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18968#[cfg_attr(feature = "ts", derive(TS))]
18969#[cfg_attr(feature = "ts", ts(export))]
18970pub struct MAG_CAL_REPORT_DATA {
18971    #[doc = "RMS milligauss residuals."]
18972    pub fitness: f32,
18973    #[doc = "X offset."]
18974    pub ofs_x: f32,
18975    #[doc = "Y offset."]
18976    pub ofs_y: f32,
18977    #[doc = "Z offset."]
18978    pub ofs_z: f32,
18979    #[doc = "X diagonal (matrix 11)."]
18980    pub diag_x: f32,
18981    #[doc = "Y diagonal (matrix 22)."]
18982    pub diag_y: f32,
18983    #[doc = "Z diagonal (matrix 33)."]
18984    pub diag_z: f32,
18985    #[doc = "X off-diagonal (matrix 12 and 21)."]
18986    pub offdiag_x: f32,
18987    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18988    pub offdiag_y: f32,
18989    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18990    pub offdiag_z: f32,
18991    #[doc = "Compass being calibrated."]
18992    pub compass_id: u8,
18993    #[doc = "Bitmask of compasses being calibrated."]
18994    pub cal_mask: u8,
18995    #[doc = "Calibration Status."]
18996    pub cal_status: MagCalStatus,
18997    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18998    pub autosaved: u8,
18999    #[doc = "Confidence in orientation (higher is better)."]
19000    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19001    pub orientation_confidence: f32,
19002    #[doc = "orientation before calibration."]
19003    #[cfg_attr(feature = "serde", serde(default))]
19004    pub old_orientation: MavSensorOrientation,
19005    #[doc = "orientation after calibration."]
19006    #[cfg_attr(feature = "serde", serde(default))]
19007    pub new_orientation: MavSensorOrientation,
19008    #[doc = "field radius correction factor"]
19009    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19010    pub scale_factor: f32,
19011}
19012impl MAG_CAL_REPORT_DATA {
19013    pub const ENCODED_LEN: usize = 54usize;
19014    pub const DEFAULT: Self = Self {
19015        fitness: 0.0_f32,
19016        ofs_x: 0.0_f32,
19017        ofs_y: 0.0_f32,
19018        ofs_z: 0.0_f32,
19019        diag_x: 0.0_f32,
19020        diag_y: 0.0_f32,
19021        diag_z: 0.0_f32,
19022        offdiag_x: 0.0_f32,
19023        offdiag_y: 0.0_f32,
19024        offdiag_z: 0.0_f32,
19025        compass_id: 0_u8,
19026        cal_mask: 0_u8,
19027        cal_status: MagCalStatus::DEFAULT,
19028        autosaved: 0_u8,
19029        orientation_confidence: 0.0_f32,
19030        old_orientation: MavSensorOrientation::DEFAULT,
19031        new_orientation: MavSensorOrientation::DEFAULT,
19032        scale_factor: 0.0_f32,
19033    };
19034    #[cfg(feature = "arbitrary")]
19035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19036        use arbitrary::{Arbitrary, Unstructured};
19037        let mut buf = [0u8; 1024];
19038        rng.fill_bytes(&mut buf);
19039        let mut unstructured = Unstructured::new(&buf);
19040        Self::arbitrary(&mut unstructured).unwrap_or_default()
19041    }
19042}
19043impl Default for MAG_CAL_REPORT_DATA {
19044    fn default() -> Self {
19045        Self::DEFAULT.clone()
19046    }
19047}
19048impl MessageData for MAG_CAL_REPORT_DATA {
19049    type Message = MavMessage;
19050    const ID: u32 = 192u32;
19051    const NAME: &'static str = "MAG_CAL_REPORT";
19052    const EXTRA_CRC: u8 = 36u8;
19053    const ENCODED_LEN: usize = 54usize;
19054    fn deser(
19055        _version: MavlinkVersion,
19056        __input: &[u8],
19057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19058        let avail_len = __input.len();
19059        let mut payload_buf = [0; Self::ENCODED_LEN];
19060        let mut buf = if avail_len < Self::ENCODED_LEN {
19061            payload_buf[0..avail_len].copy_from_slice(__input);
19062            Bytes::new(&payload_buf)
19063        } else {
19064            Bytes::new(__input)
19065        };
19066        let mut __struct = Self::default();
19067        __struct.fitness = buf.get_f32_le()?;
19068        __struct.ofs_x = buf.get_f32_le()?;
19069        __struct.ofs_y = buf.get_f32_le()?;
19070        __struct.ofs_z = buf.get_f32_le()?;
19071        __struct.diag_x = buf.get_f32_le()?;
19072        __struct.diag_y = buf.get_f32_le()?;
19073        __struct.diag_z = buf.get_f32_le()?;
19074        __struct.offdiag_x = buf.get_f32_le()?;
19075        __struct.offdiag_y = buf.get_f32_le()?;
19076        __struct.offdiag_z = buf.get_f32_le()?;
19077        __struct.compass_id = buf.get_u8()?;
19078        __struct.cal_mask = buf.get_u8()?;
19079        let tmp = buf.get_u8()?;
19080        __struct.cal_status =
19081            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19082                enum_type: "MagCalStatus",
19083                value: tmp as u64,
19084            })?;
19085        __struct.autosaved = buf.get_u8()?;
19086        __struct.orientation_confidence = buf.get_f32_le()?;
19087        let tmp = buf.get_u8()?;
19088        __struct.old_orientation =
19089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19090                enum_type: "MavSensorOrientation",
19091                value: tmp as u64,
19092            })?;
19093        let tmp = buf.get_u8()?;
19094        __struct.new_orientation =
19095            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19096                enum_type: "MavSensorOrientation",
19097                value: tmp as u64,
19098            })?;
19099        __struct.scale_factor = buf.get_f32_le()?;
19100        Ok(__struct)
19101    }
19102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19103        let mut __tmp = BytesMut::new(bytes);
19104        #[allow(clippy::absurd_extreme_comparisons)]
19105        #[allow(unused_comparisons)]
19106        if __tmp.remaining() < Self::ENCODED_LEN {
19107            panic!(
19108                "buffer is too small (need {} bytes, but got {})",
19109                Self::ENCODED_LEN,
19110                __tmp.remaining(),
19111            )
19112        }
19113        __tmp.put_f32_le(self.fitness);
19114        __tmp.put_f32_le(self.ofs_x);
19115        __tmp.put_f32_le(self.ofs_y);
19116        __tmp.put_f32_le(self.ofs_z);
19117        __tmp.put_f32_le(self.diag_x);
19118        __tmp.put_f32_le(self.diag_y);
19119        __tmp.put_f32_le(self.diag_z);
19120        __tmp.put_f32_le(self.offdiag_x);
19121        __tmp.put_f32_le(self.offdiag_y);
19122        __tmp.put_f32_le(self.offdiag_z);
19123        __tmp.put_u8(self.compass_id);
19124        __tmp.put_u8(self.cal_mask);
19125        __tmp.put_u8(self.cal_status as u8);
19126        __tmp.put_u8(self.autosaved);
19127        if matches!(version, MavlinkVersion::V2) {
19128            __tmp.put_f32_le(self.orientation_confidence);
19129            __tmp.put_u8(self.old_orientation as u8);
19130            __tmp.put_u8(self.new_orientation as u8);
19131            __tmp.put_f32_le(self.scale_factor);
19132            let len = __tmp.len();
19133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19134        } else {
19135            __tmp.len()
19136        }
19137    }
19138}
19139#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19140#[doc = ""]
19141#[doc = "ID: 69"]
19142#[derive(Debug, Clone, PartialEq)]
19143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19145#[cfg_attr(feature = "ts", derive(TS))]
19146#[cfg_attr(feature = "ts", ts(export))]
19147pub struct MANUAL_CONTROL_DATA {
19148    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19149    pub x: i16,
19150    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19151    pub y: i16,
19152    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19153    pub z: i16,
19154    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19155    pub r: i16,
19156    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19157    pub buttons: u16,
19158    #[doc = "The system to be controlled."]
19159    pub target: u8,
19160    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19161    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19162    pub buttons2: u16,
19163    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19164    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19165    pub enabled_extensions: u8,
19166    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19167    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19168    pub s: i16,
19169    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19170    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19171    pub t: i16,
19172    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19174    pub aux1: i16,
19175    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19177    pub aux2: i16,
19178    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19179    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19180    pub aux3: i16,
19181    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19183    pub aux4: i16,
19184    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19185    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19186    pub aux5: i16,
19187    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19188    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19189    pub aux6: i16,
19190}
19191impl MANUAL_CONTROL_DATA {
19192    pub const ENCODED_LEN: usize = 30usize;
19193    pub const DEFAULT: Self = Self {
19194        x: 0_i16,
19195        y: 0_i16,
19196        z: 0_i16,
19197        r: 0_i16,
19198        buttons: 0_u16,
19199        target: 0_u8,
19200        buttons2: 0_u16,
19201        enabled_extensions: 0_u8,
19202        s: 0_i16,
19203        t: 0_i16,
19204        aux1: 0_i16,
19205        aux2: 0_i16,
19206        aux3: 0_i16,
19207        aux4: 0_i16,
19208        aux5: 0_i16,
19209        aux6: 0_i16,
19210    };
19211    #[cfg(feature = "arbitrary")]
19212    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19213        use arbitrary::{Arbitrary, Unstructured};
19214        let mut buf = [0u8; 1024];
19215        rng.fill_bytes(&mut buf);
19216        let mut unstructured = Unstructured::new(&buf);
19217        Self::arbitrary(&mut unstructured).unwrap_or_default()
19218    }
19219}
19220impl Default for MANUAL_CONTROL_DATA {
19221    fn default() -> Self {
19222        Self::DEFAULT.clone()
19223    }
19224}
19225impl MessageData for MANUAL_CONTROL_DATA {
19226    type Message = MavMessage;
19227    const ID: u32 = 69u32;
19228    const NAME: &'static str = "MANUAL_CONTROL";
19229    const EXTRA_CRC: u8 = 243u8;
19230    const ENCODED_LEN: usize = 30usize;
19231    fn deser(
19232        _version: MavlinkVersion,
19233        __input: &[u8],
19234    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19235        let avail_len = __input.len();
19236        let mut payload_buf = [0; Self::ENCODED_LEN];
19237        let mut buf = if avail_len < Self::ENCODED_LEN {
19238            payload_buf[0..avail_len].copy_from_slice(__input);
19239            Bytes::new(&payload_buf)
19240        } else {
19241            Bytes::new(__input)
19242        };
19243        let mut __struct = Self::default();
19244        __struct.x = buf.get_i16_le()?;
19245        __struct.y = buf.get_i16_le()?;
19246        __struct.z = buf.get_i16_le()?;
19247        __struct.r = buf.get_i16_le()?;
19248        __struct.buttons = buf.get_u16_le()?;
19249        __struct.target = buf.get_u8()?;
19250        __struct.buttons2 = buf.get_u16_le()?;
19251        __struct.enabled_extensions = buf.get_u8()?;
19252        __struct.s = buf.get_i16_le()?;
19253        __struct.t = buf.get_i16_le()?;
19254        __struct.aux1 = buf.get_i16_le()?;
19255        __struct.aux2 = buf.get_i16_le()?;
19256        __struct.aux3 = buf.get_i16_le()?;
19257        __struct.aux4 = buf.get_i16_le()?;
19258        __struct.aux5 = buf.get_i16_le()?;
19259        __struct.aux6 = buf.get_i16_le()?;
19260        Ok(__struct)
19261    }
19262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19263        let mut __tmp = BytesMut::new(bytes);
19264        #[allow(clippy::absurd_extreme_comparisons)]
19265        #[allow(unused_comparisons)]
19266        if __tmp.remaining() < Self::ENCODED_LEN {
19267            panic!(
19268                "buffer is too small (need {} bytes, but got {})",
19269                Self::ENCODED_LEN,
19270                __tmp.remaining(),
19271            )
19272        }
19273        __tmp.put_i16_le(self.x);
19274        __tmp.put_i16_le(self.y);
19275        __tmp.put_i16_le(self.z);
19276        __tmp.put_i16_le(self.r);
19277        __tmp.put_u16_le(self.buttons);
19278        __tmp.put_u8(self.target);
19279        if matches!(version, MavlinkVersion::V2) {
19280            __tmp.put_u16_le(self.buttons2);
19281            __tmp.put_u8(self.enabled_extensions);
19282            __tmp.put_i16_le(self.s);
19283            __tmp.put_i16_le(self.t);
19284            __tmp.put_i16_le(self.aux1);
19285            __tmp.put_i16_le(self.aux2);
19286            __tmp.put_i16_le(self.aux3);
19287            __tmp.put_i16_le(self.aux4);
19288            __tmp.put_i16_le(self.aux5);
19289            __tmp.put_i16_le(self.aux6);
19290            let len = __tmp.len();
19291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19292        } else {
19293            __tmp.len()
19294        }
19295    }
19296}
19297#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19298#[doc = ""]
19299#[doc = "ID: 81"]
19300#[derive(Debug, Clone, PartialEq)]
19301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19303#[cfg_attr(feature = "ts", derive(TS))]
19304#[cfg_attr(feature = "ts", ts(export))]
19305pub struct MANUAL_SETPOINT_DATA {
19306    #[doc = "Timestamp (time since system boot)."]
19307    pub time_boot_ms: u32,
19308    #[doc = "Desired roll rate"]
19309    pub roll: f32,
19310    #[doc = "Desired pitch rate"]
19311    pub pitch: f32,
19312    #[doc = "Desired yaw rate"]
19313    pub yaw: f32,
19314    #[doc = "Collective thrust, normalized to 0 .. 1"]
19315    pub thrust: f32,
19316    #[doc = "Flight mode switch position, 0.. 255"]
19317    pub mode_switch: u8,
19318    #[doc = "Override mode switch position, 0.. 255"]
19319    pub manual_override_switch: u8,
19320}
19321impl MANUAL_SETPOINT_DATA {
19322    pub const ENCODED_LEN: usize = 22usize;
19323    pub const DEFAULT: Self = Self {
19324        time_boot_ms: 0_u32,
19325        roll: 0.0_f32,
19326        pitch: 0.0_f32,
19327        yaw: 0.0_f32,
19328        thrust: 0.0_f32,
19329        mode_switch: 0_u8,
19330        manual_override_switch: 0_u8,
19331    };
19332    #[cfg(feature = "arbitrary")]
19333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19334        use arbitrary::{Arbitrary, Unstructured};
19335        let mut buf = [0u8; 1024];
19336        rng.fill_bytes(&mut buf);
19337        let mut unstructured = Unstructured::new(&buf);
19338        Self::arbitrary(&mut unstructured).unwrap_or_default()
19339    }
19340}
19341impl Default for MANUAL_SETPOINT_DATA {
19342    fn default() -> Self {
19343        Self::DEFAULT.clone()
19344    }
19345}
19346impl MessageData for MANUAL_SETPOINT_DATA {
19347    type Message = MavMessage;
19348    const ID: u32 = 81u32;
19349    const NAME: &'static str = "MANUAL_SETPOINT";
19350    const EXTRA_CRC: u8 = 106u8;
19351    const ENCODED_LEN: usize = 22usize;
19352    fn deser(
19353        _version: MavlinkVersion,
19354        __input: &[u8],
19355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19356        let avail_len = __input.len();
19357        let mut payload_buf = [0; Self::ENCODED_LEN];
19358        let mut buf = if avail_len < Self::ENCODED_LEN {
19359            payload_buf[0..avail_len].copy_from_slice(__input);
19360            Bytes::new(&payload_buf)
19361        } else {
19362            Bytes::new(__input)
19363        };
19364        let mut __struct = Self::default();
19365        __struct.time_boot_ms = buf.get_u32_le()?;
19366        __struct.roll = buf.get_f32_le()?;
19367        __struct.pitch = buf.get_f32_le()?;
19368        __struct.yaw = buf.get_f32_le()?;
19369        __struct.thrust = buf.get_f32_le()?;
19370        __struct.mode_switch = buf.get_u8()?;
19371        __struct.manual_override_switch = buf.get_u8()?;
19372        Ok(__struct)
19373    }
19374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19375        let mut __tmp = BytesMut::new(bytes);
19376        #[allow(clippy::absurd_extreme_comparisons)]
19377        #[allow(unused_comparisons)]
19378        if __tmp.remaining() < Self::ENCODED_LEN {
19379            panic!(
19380                "buffer is too small (need {} bytes, but got {})",
19381                Self::ENCODED_LEN,
19382                __tmp.remaining(),
19383            )
19384        }
19385        __tmp.put_u32_le(self.time_boot_ms);
19386        __tmp.put_f32_le(self.roll);
19387        __tmp.put_f32_le(self.pitch);
19388        __tmp.put_f32_le(self.yaw);
19389        __tmp.put_f32_le(self.thrust);
19390        __tmp.put_u8(self.mode_switch);
19391        __tmp.put_u8(self.manual_override_switch);
19392        if matches!(version, MavlinkVersion::V2) {
19393            let len = __tmp.len();
19394            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19395        } else {
19396            __tmp.len()
19397        }
19398    }
19399}
19400#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19401#[doc = ""]
19402#[doc = "ID: 249"]
19403#[derive(Debug, Clone, PartialEq)]
19404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19406#[cfg_attr(feature = "ts", derive(TS))]
19407#[cfg_attr(feature = "ts", ts(export))]
19408pub struct MEMORY_VECT_DATA {
19409    #[doc = "Starting address of the debug variables"]
19410    pub address: u16,
19411    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19412    pub ver: u8,
19413    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19414    pub mavtype: u8,
19415    #[doc = "Memory contents at specified address"]
19416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19418    pub value: [i8; 32],
19419}
19420impl MEMORY_VECT_DATA {
19421    pub const ENCODED_LEN: usize = 36usize;
19422    pub const DEFAULT: Self = Self {
19423        address: 0_u16,
19424        ver: 0_u8,
19425        mavtype: 0_u8,
19426        value: [0_i8; 32usize],
19427    };
19428    #[cfg(feature = "arbitrary")]
19429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19430        use arbitrary::{Arbitrary, Unstructured};
19431        let mut buf = [0u8; 1024];
19432        rng.fill_bytes(&mut buf);
19433        let mut unstructured = Unstructured::new(&buf);
19434        Self::arbitrary(&mut unstructured).unwrap_or_default()
19435    }
19436}
19437impl Default for MEMORY_VECT_DATA {
19438    fn default() -> Self {
19439        Self::DEFAULT.clone()
19440    }
19441}
19442impl MessageData for MEMORY_VECT_DATA {
19443    type Message = MavMessage;
19444    const ID: u32 = 249u32;
19445    const NAME: &'static str = "MEMORY_VECT";
19446    const EXTRA_CRC: u8 = 204u8;
19447    const ENCODED_LEN: usize = 36usize;
19448    fn deser(
19449        _version: MavlinkVersion,
19450        __input: &[u8],
19451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19452        let avail_len = __input.len();
19453        let mut payload_buf = [0; Self::ENCODED_LEN];
19454        let mut buf = if avail_len < Self::ENCODED_LEN {
19455            payload_buf[0..avail_len].copy_from_slice(__input);
19456            Bytes::new(&payload_buf)
19457        } else {
19458            Bytes::new(__input)
19459        };
19460        let mut __struct = Self::default();
19461        __struct.address = buf.get_u16_le()?;
19462        __struct.ver = buf.get_u8()?;
19463        __struct.mavtype = buf.get_u8()?;
19464        for v in &mut __struct.value {
19465            let val = buf.get_i8()?;
19466            *v = val;
19467        }
19468        Ok(__struct)
19469    }
19470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19471        let mut __tmp = BytesMut::new(bytes);
19472        #[allow(clippy::absurd_extreme_comparisons)]
19473        #[allow(unused_comparisons)]
19474        if __tmp.remaining() < Self::ENCODED_LEN {
19475            panic!(
19476                "buffer is too small (need {} bytes, but got {})",
19477                Self::ENCODED_LEN,
19478                __tmp.remaining(),
19479            )
19480        }
19481        __tmp.put_u16_le(self.address);
19482        __tmp.put_u8(self.ver);
19483        __tmp.put_u8(self.mavtype);
19484        for val in &self.value {
19485            __tmp.put_i8(*val);
19486        }
19487        if matches!(version, MavlinkVersion::V2) {
19488            let len = __tmp.len();
19489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19490        } else {
19491            __tmp.len()
19492        }
19493    }
19494}
19495#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19496#[doc = ""]
19497#[doc = "ID: 244"]
19498#[derive(Debug, Clone, PartialEq)]
19499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19501#[cfg_attr(feature = "ts", derive(TS))]
19502#[cfg_attr(feature = "ts", ts(export))]
19503pub struct MESSAGE_INTERVAL_DATA {
19504    #[doc = "0 indicates the interval at which it is sent."]
19505    pub interval_us: i32,
19506    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19507    pub message_id: u16,
19508}
19509impl MESSAGE_INTERVAL_DATA {
19510    pub const ENCODED_LEN: usize = 6usize;
19511    pub const DEFAULT: Self = Self {
19512        interval_us: 0_i32,
19513        message_id: 0_u16,
19514    };
19515    #[cfg(feature = "arbitrary")]
19516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19517        use arbitrary::{Arbitrary, Unstructured};
19518        let mut buf = [0u8; 1024];
19519        rng.fill_bytes(&mut buf);
19520        let mut unstructured = Unstructured::new(&buf);
19521        Self::arbitrary(&mut unstructured).unwrap_or_default()
19522    }
19523}
19524impl Default for MESSAGE_INTERVAL_DATA {
19525    fn default() -> Self {
19526        Self::DEFAULT.clone()
19527    }
19528}
19529impl MessageData for MESSAGE_INTERVAL_DATA {
19530    type Message = MavMessage;
19531    const ID: u32 = 244u32;
19532    const NAME: &'static str = "MESSAGE_INTERVAL";
19533    const EXTRA_CRC: u8 = 95u8;
19534    const ENCODED_LEN: usize = 6usize;
19535    fn deser(
19536        _version: MavlinkVersion,
19537        __input: &[u8],
19538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19539        let avail_len = __input.len();
19540        let mut payload_buf = [0; Self::ENCODED_LEN];
19541        let mut buf = if avail_len < Self::ENCODED_LEN {
19542            payload_buf[0..avail_len].copy_from_slice(__input);
19543            Bytes::new(&payload_buf)
19544        } else {
19545            Bytes::new(__input)
19546        };
19547        let mut __struct = Self::default();
19548        __struct.interval_us = buf.get_i32_le()?;
19549        __struct.message_id = buf.get_u16_le()?;
19550        Ok(__struct)
19551    }
19552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19553        let mut __tmp = BytesMut::new(bytes);
19554        #[allow(clippy::absurd_extreme_comparisons)]
19555        #[allow(unused_comparisons)]
19556        if __tmp.remaining() < Self::ENCODED_LEN {
19557            panic!(
19558                "buffer is too small (need {} bytes, but got {})",
19559                Self::ENCODED_LEN,
19560                __tmp.remaining(),
19561            )
19562        }
19563        __tmp.put_i32_le(self.interval_us);
19564        __tmp.put_u16_le(self.message_id);
19565        if matches!(version, MavlinkVersion::V2) {
19566            let len = __tmp.len();
19567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19568        } else {
19569            __tmp.len()
19570        }
19571    }
19572}
19573#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19574#[doc = ""]
19575#[doc = "ID: 47"]
19576#[derive(Debug, Clone, PartialEq)]
19577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19579#[cfg_attr(feature = "ts", derive(TS))]
19580#[cfg_attr(feature = "ts", ts(export))]
19581pub struct MISSION_ACK_DATA {
19582    #[doc = "System ID"]
19583    pub target_system: u8,
19584    #[doc = "Component ID"]
19585    pub target_component: u8,
19586    #[doc = "Mission result."]
19587    pub mavtype: MavMissionResult,
19588    #[doc = "Mission type."]
19589    #[cfg_attr(feature = "serde", serde(default))]
19590    pub mission_type: MavMissionType,
19591    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19593    pub opaque_id: u32,
19594}
19595impl MISSION_ACK_DATA {
19596    pub const ENCODED_LEN: usize = 8usize;
19597    pub const DEFAULT: Self = Self {
19598        target_system: 0_u8,
19599        target_component: 0_u8,
19600        mavtype: MavMissionResult::DEFAULT,
19601        mission_type: MavMissionType::DEFAULT,
19602        opaque_id: 0_u32,
19603    };
19604    #[cfg(feature = "arbitrary")]
19605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19606        use arbitrary::{Arbitrary, Unstructured};
19607        let mut buf = [0u8; 1024];
19608        rng.fill_bytes(&mut buf);
19609        let mut unstructured = Unstructured::new(&buf);
19610        Self::arbitrary(&mut unstructured).unwrap_or_default()
19611    }
19612}
19613impl Default for MISSION_ACK_DATA {
19614    fn default() -> Self {
19615        Self::DEFAULT.clone()
19616    }
19617}
19618impl MessageData for MISSION_ACK_DATA {
19619    type Message = MavMessage;
19620    const ID: u32 = 47u32;
19621    const NAME: &'static str = "MISSION_ACK";
19622    const EXTRA_CRC: u8 = 153u8;
19623    const ENCODED_LEN: usize = 8usize;
19624    fn deser(
19625        _version: MavlinkVersion,
19626        __input: &[u8],
19627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19628        let avail_len = __input.len();
19629        let mut payload_buf = [0; Self::ENCODED_LEN];
19630        let mut buf = if avail_len < Self::ENCODED_LEN {
19631            payload_buf[0..avail_len].copy_from_slice(__input);
19632            Bytes::new(&payload_buf)
19633        } else {
19634            Bytes::new(__input)
19635        };
19636        let mut __struct = Self::default();
19637        __struct.target_system = buf.get_u8()?;
19638        __struct.target_component = buf.get_u8()?;
19639        let tmp = buf.get_u8()?;
19640        __struct.mavtype =
19641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19642                enum_type: "MavMissionResult",
19643                value: tmp as u64,
19644            })?;
19645        let tmp = buf.get_u8()?;
19646        __struct.mission_type =
19647            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19648                enum_type: "MavMissionType",
19649                value: tmp as u64,
19650            })?;
19651        __struct.opaque_id = buf.get_u32_le()?;
19652        Ok(__struct)
19653    }
19654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19655        let mut __tmp = BytesMut::new(bytes);
19656        #[allow(clippy::absurd_extreme_comparisons)]
19657        #[allow(unused_comparisons)]
19658        if __tmp.remaining() < Self::ENCODED_LEN {
19659            panic!(
19660                "buffer is too small (need {} bytes, but got {})",
19661                Self::ENCODED_LEN,
19662                __tmp.remaining(),
19663            )
19664        }
19665        __tmp.put_u8(self.target_system);
19666        __tmp.put_u8(self.target_component);
19667        __tmp.put_u8(self.mavtype as u8);
19668        if matches!(version, MavlinkVersion::V2) {
19669            __tmp.put_u8(self.mission_type as u8);
19670            __tmp.put_u32_le(self.opaque_id);
19671            let len = __tmp.len();
19672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19673        } else {
19674            __tmp.len()
19675        }
19676    }
19677}
19678#[doc = "Delete all mission items at once."]
19679#[doc = ""]
19680#[doc = "ID: 45"]
19681#[derive(Debug, Clone, PartialEq)]
19682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19684#[cfg_attr(feature = "ts", derive(TS))]
19685#[cfg_attr(feature = "ts", ts(export))]
19686pub struct MISSION_CLEAR_ALL_DATA {
19687    #[doc = "System ID"]
19688    pub target_system: u8,
19689    #[doc = "Component ID"]
19690    pub target_component: u8,
19691    #[doc = "Mission type."]
19692    #[cfg_attr(feature = "serde", serde(default))]
19693    pub mission_type: MavMissionType,
19694}
19695impl MISSION_CLEAR_ALL_DATA {
19696    pub const ENCODED_LEN: usize = 3usize;
19697    pub const DEFAULT: Self = Self {
19698        target_system: 0_u8,
19699        target_component: 0_u8,
19700        mission_type: MavMissionType::DEFAULT,
19701    };
19702    #[cfg(feature = "arbitrary")]
19703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19704        use arbitrary::{Arbitrary, Unstructured};
19705        let mut buf = [0u8; 1024];
19706        rng.fill_bytes(&mut buf);
19707        let mut unstructured = Unstructured::new(&buf);
19708        Self::arbitrary(&mut unstructured).unwrap_or_default()
19709    }
19710}
19711impl Default for MISSION_CLEAR_ALL_DATA {
19712    fn default() -> Self {
19713        Self::DEFAULT.clone()
19714    }
19715}
19716impl MessageData for MISSION_CLEAR_ALL_DATA {
19717    type Message = MavMessage;
19718    const ID: u32 = 45u32;
19719    const NAME: &'static str = "MISSION_CLEAR_ALL";
19720    const EXTRA_CRC: u8 = 232u8;
19721    const ENCODED_LEN: usize = 3usize;
19722    fn deser(
19723        _version: MavlinkVersion,
19724        __input: &[u8],
19725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19726        let avail_len = __input.len();
19727        let mut payload_buf = [0; Self::ENCODED_LEN];
19728        let mut buf = if avail_len < Self::ENCODED_LEN {
19729            payload_buf[0..avail_len].copy_from_slice(__input);
19730            Bytes::new(&payload_buf)
19731        } else {
19732            Bytes::new(__input)
19733        };
19734        let mut __struct = Self::default();
19735        __struct.target_system = buf.get_u8()?;
19736        __struct.target_component = buf.get_u8()?;
19737        let tmp = buf.get_u8()?;
19738        __struct.mission_type =
19739            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19740                enum_type: "MavMissionType",
19741                value: tmp as u64,
19742            })?;
19743        Ok(__struct)
19744    }
19745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19746        let mut __tmp = BytesMut::new(bytes);
19747        #[allow(clippy::absurd_extreme_comparisons)]
19748        #[allow(unused_comparisons)]
19749        if __tmp.remaining() < Self::ENCODED_LEN {
19750            panic!(
19751                "buffer is too small (need {} bytes, but got {})",
19752                Self::ENCODED_LEN,
19753                __tmp.remaining(),
19754            )
19755        }
19756        __tmp.put_u8(self.target_system);
19757        __tmp.put_u8(self.target_component);
19758        if matches!(version, MavlinkVersion::V2) {
19759            __tmp.put_u8(self.mission_type as u8);
19760            let len = __tmp.len();
19761            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19762        } else {
19763            __tmp.len()
19764        }
19765    }
19766}
19767#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19768#[doc = ""]
19769#[doc = "ID: 44"]
19770#[derive(Debug, Clone, PartialEq)]
19771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19773#[cfg_attr(feature = "ts", derive(TS))]
19774#[cfg_attr(feature = "ts", ts(export))]
19775pub struct MISSION_COUNT_DATA {
19776    #[doc = "Number of mission items in the sequence"]
19777    pub count: u16,
19778    #[doc = "System ID"]
19779    pub target_system: u8,
19780    #[doc = "Component ID"]
19781    pub target_component: u8,
19782    #[doc = "Mission type."]
19783    #[cfg_attr(feature = "serde", serde(default))]
19784    pub mission_type: MavMissionType,
19785    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19787    pub opaque_id: u32,
19788}
19789impl MISSION_COUNT_DATA {
19790    pub const ENCODED_LEN: usize = 9usize;
19791    pub const DEFAULT: Self = Self {
19792        count: 0_u16,
19793        target_system: 0_u8,
19794        target_component: 0_u8,
19795        mission_type: MavMissionType::DEFAULT,
19796        opaque_id: 0_u32,
19797    };
19798    #[cfg(feature = "arbitrary")]
19799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19800        use arbitrary::{Arbitrary, Unstructured};
19801        let mut buf = [0u8; 1024];
19802        rng.fill_bytes(&mut buf);
19803        let mut unstructured = Unstructured::new(&buf);
19804        Self::arbitrary(&mut unstructured).unwrap_or_default()
19805    }
19806}
19807impl Default for MISSION_COUNT_DATA {
19808    fn default() -> Self {
19809        Self::DEFAULT.clone()
19810    }
19811}
19812impl MessageData for MISSION_COUNT_DATA {
19813    type Message = MavMessage;
19814    const ID: u32 = 44u32;
19815    const NAME: &'static str = "MISSION_COUNT";
19816    const EXTRA_CRC: u8 = 221u8;
19817    const ENCODED_LEN: usize = 9usize;
19818    fn deser(
19819        _version: MavlinkVersion,
19820        __input: &[u8],
19821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19822        let avail_len = __input.len();
19823        let mut payload_buf = [0; Self::ENCODED_LEN];
19824        let mut buf = if avail_len < Self::ENCODED_LEN {
19825            payload_buf[0..avail_len].copy_from_slice(__input);
19826            Bytes::new(&payload_buf)
19827        } else {
19828            Bytes::new(__input)
19829        };
19830        let mut __struct = Self::default();
19831        __struct.count = buf.get_u16_le()?;
19832        __struct.target_system = buf.get_u8()?;
19833        __struct.target_component = buf.get_u8()?;
19834        let tmp = buf.get_u8()?;
19835        __struct.mission_type =
19836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19837                enum_type: "MavMissionType",
19838                value: tmp as u64,
19839            })?;
19840        __struct.opaque_id = buf.get_u32_le()?;
19841        Ok(__struct)
19842    }
19843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19844        let mut __tmp = BytesMut::new(bytes);
19845        #[allow(clippy::absurd_extreme_comparisons)]
19846        #[allow(unused_comparisons)]
19847        if __tmp.remaining() < Self::ENCODED_LEN {
19848            panic!(
19849                "buffer is too small (need {} bytes, but got {})",
19850                Self::ENCODED_LEN,
19851                __tmp.remaining(),
19852            )
19853        }
19854        __tmp.put_u16_le(self.count);
19855        __tmp.put_u8(self.target_system);
19856        __tmp.put_u8(self.target_component);
19857        if matches!(version, MavlinkVersion::V2) {
19858            __tmp.put_u8(self.mission_type as u8);
19859            __tmp.put_u32_le(self.opaque_id);
19860            let len = __tmp.len();
19861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19862        } else {
19863            __tmp.len()
19864        }
19865    }
19866}
19867#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19868#[doc = ""]
19869#[doc = "ID: 42"]
19870#[derive(Debug, Clone, PartialEq)]
19871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19873#[cfg_attr(feature = "ts", derive(TS))]
19874#[cfg_attr(feature = "ts", ts(export))]
19875pub struct MISSION_CURRENT_DATA {
19876    #[doc = "Sequence"]
19877    pub seq: u16,
19878    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19880    pub total: u16,
19881    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19882    #[cfg_attr(feature = "serde", serde(default))]
19883    pub mission_state: MissionState,
19884    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19885    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19886    pub mission_mode: u8,
19887    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19889    pub mission_id: u32,
19890    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19892    pub fence_id: u32,
19893    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19895    pub rally_points_id: u32,
19896}
19897impl MISSION_CURRENT_DATA {
19898    pub const ENCODED_LEN: usize = 18usize;
19899    pub const DEFAULT: Self = Self {
19900        seq: 0_u16,
19901        total: 0_u16,
19902        mission_state: MissionState::DEFAULT,
19903        mission_mode: 0_u8,
19904        mission_id: 0_u32,
19905        fence_id: 0_u32,
19906        rally_points_id: 0_u32,
19907    };
19908    #[cfg(feature = "arbitrary")]
19909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19910        use arbitrary::{Arbitrary, Unstructured};
19911        let mut buf = [0u8; 1024];
19912        rng.fill_bytes(&mut buf);
19913        let mut unstructured = Unstructured::new(&buf);
19914        Self::arbitrary(&mut unstructured).unwrap_or_default()
19915    }
19916}
19917impl Default for MISSION_CURRENT_DATA {
19918    fn default() -> Self {
19919        Self::DEFAULT.clone()
19920    }
19921}
19922impl MessageData for MISSION_CURRENT_DATA {
19923    type Message = MavMessage;
19924    const ID: u32 = 42u32;
19925    const NAME: &'static str = "MISSION_CURRENT";
19926    const EXTRA_CRC: u8 = 28u8;
19927    const ENCODED_LEN: usize = 18usize;
19928    fn deser(
19929        _version: MavlinkVersion,
19930        __input: &[u8],
19931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19932        let avail_len = __input.len();
19933        let mut payload_buf = [0; Self::ENCODED_LEN];
19934        let mut buf = if avail_len < Self::ENCODED_LEN {
19935            payload_buf[0..avail_len].copy_from_slice(__input);
19936            Bytes::new(&payload_buf)
19937        } else {
19938            Bytes::new(__input)
19939        };
19940        let mut __struct = Self::default();
19941        __struct.seq = buf.get_u16_le()?;
19942        __struct.total = buf.get_u16_le()?;
19943        let tmp = buf.get_u8()?;
19944        __struct.mission_state =
19945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19946                enum_type: "MissionState",
19947                value: tmp as u64,
19948            })?;
19949        __struct.mission_mode = buf.get_u8()?;
19950        __struct.mission_id = buf.get_u32_le()?;
19951        __struct.fence_id = buf.get_u32_le()?;
19952        __struct.rally_points_id = buf.get_u32_le()?;
19953        Ok(__struct)
19954    }
19955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19956        let mut __tmp = BytesMut::new(bytes);
19957        #[allow(clippy::absurd_extreme_comparisons)]
19958        #[allow(unused_comparisons)]
19959        if __tmp.remaining() < Self::ENCODED_LEN {
19960            panic!(
19961                "buffer is too small (need {} bytes, but got {})",
19962                Self::ENCODED_LEN,
19963                __tmp.remaining(),
19964            )
19965        }
19966        __tmp.put_u16_le(self.seq);
19967        if matches!(version, MavlinkVersion::V2) {
19968            __tmp.put_u16_le(self.total);
19969            __tmp.put_u8(self.mission_state as u8);
19970            __tmp.put_u8(self.mission_mode);
19971            __tmp.put_u32_le(self.mission_id);
19972            __tmp.put_u32_le(self.fence_id);
19973            __tmp.put_u32_le(self.rally_points_id);
19974            let len = __tmp.len();
19975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19976        } else {
19977            __tmp.len()
19978        }
19979    }
19980}
19981#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19982#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19983#[doc = ""]
19984#[doc = "ID: 39"]
19985#[derive(Debug, Clone, PartialEq)]
19986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19988#[cfg_attr(feature = "ts", derive(TS))]
19989#[cfg_attr(feature = "ts", ts(export))]
19990pub struct MISSION_ITEM_DATA {
19991    #[doc = "PARAM1, see MAV_CMD enum"]
19992    pub param1: f32,
19993    #[doc = "PARAM2, see MAV_CMD enum"]
19994    pub param2: f32,
19995    #[doc = "PARAM3, see MAV_CMD enum"]
19996    pub param3: f32,
19997    #[doc = "PARAM4, see MAV_CMD enum"]
19998    pub param4: f32,
19999    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20000    pub x: f32,
20001    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20002    pub y: f32,
20003    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20004    pub z: f32,
20005    #[doc = "Sequence"]
20006    pub seq: u16,
20007    #[doc = "The scheduled action for the waypoint."]
20008    pub command: MavCmd,
20009    #[doc = "System ID"]
20010    pub target_system: u8,
20011    #[doc = "Component ID"]
20012    pub target_component: u8,
20013    #[doc = "The coordinate system of the waypoint."]
20014    pub frame: MavFrame,
20015    #[doc = "false:0, true:1"]
20016    pub current: u8,
20017    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20018    pub autocontinue: u8,
20019    #[doc = "Mission type."]
20020    #[cfg_attr(feature = "serde", serde(default))]
20021    pub mission_type: MavMissionType,
20022}
20023impl MISSION_ITEM_DATA {
20024    pub const ENCODED_LEN: usize = 38usize;
20025    pub const DEFAULT: Self = Self {
20026        param1: 0.0_f32,
20027        param2: 0.0_f32,
20028        param3: 0.0_f32,
20029        param4: 0.0_f32,
20030        x: 0.0_f32,
20031        y: 0.0_f32,
20032        z: 0.0_f32,
20033        seq: 0_u16,
20034        command: MavCmd::DEFAULT,
20035        target_system: 0_u8,
20036        target_component: 0_u8,
20037        frame: MavFrame::DEFAULT,
20038        current: 0_u8,
20039        autocontinue: 0_u8,
20040        mission_type: MavMissionType::DEFAULT,
20041    };
20042    #[cfg(feature = "arbitrary")]
20043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20044        use arbitrary::{Arbitrary, Unstructured};
20045        let mut buf = [0u8; 1024];
20046        rng.fill_bytes(&mut buf);
20047        let mut unstructured = Unstructured::new(&buf);
20048        Self::arbitrary(&mut unstructured).unwrap_or_default()
20049    }
20050}
20051impl Default for MISSION_ITEM_DATA {
20052    fn default() -> Self {
20053        Self::DEFAULT.clone()
20054    }
20055}
20056impl MessageData for MISSION_ITEM_DATA {
20057    type Message = MavMessage;
20058    const ID: u32 = 39u32;
20059    const NAME: &'static str = "MISSION_ITEM";
20060    const EXTRA_CRC: u8 = 254u8;
20061    const ENCODED_LEN: usize = 38usize;
20062    fn deser(
20063        _version: MavlinkVersion,
20064        __input: &[u8],
20065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20066        let avail_len = __input.len();
20067        let mut payload_buf = [0; Self::ENCODED_LEN];
20068        let mut buf = if avail_len < Self::ENCODED_LEN {
20069            payload_buf[0..avail_len].copy_from_slice(__input);
20070            Bytes::new(&payload_buf)
20071        } else {
20072            Bytes::new(__input)
20073        };
20074        let mut __struct = Self::default();
20075        __struct.param1 = buf.get_f32_le()?;
20076        __struct.param2 = buf.get_f32_le()?;
20077        __struct.param3 = buf.get_f32_le()?;
20078        __struct.param4 = buf.get_f32_le()?;
20079        __struct.x = buf.get_f32_le()?;
20080        __struct.y = buf.get_f32_le()?;
20081        __struct.z = buf.get_f32_le()?;
20082        __struct.seq = buf.get_u16_le()?;
20083        let tmp = buf.get_u16_le()?;
20084        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20085            ::mavlink_core::error::ParserError::InvalidEnum {
20086                enum_type: "MavCmd",
20087                value: tmp as u64,
20088            },
20089        )?;
20090        __struct.target_system = buf.get_u8()?;
20091        __struct.target_component = buf.get_u8()?;
20092        let tmp = buf.get_u8()?;
20093        __struct.frame =
20094            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20095                enum_type: "MavFrame",
20096                value: tmp as u64,
20097            })?;
20098        __struct.current = buf.get_u8()?;
20099        __struct.autocontinue = buf.get_u8()?;
20100        let tmp = buf.get_u8()?;
20101        __struct.mission_type =
20102            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20103                enum_type: "MavMissionType",
20104                value: tmp as u64,
20105            })?;
20106        Ok(__struct)
20107    }
20108    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20109        let mut __tmp = BytesMut::new(bytes);
20110        #[allow(clippy::absurd_extreme_comparisons)]
20111        #[allow(unused_comparisons)]
20112        if __tmp.remaining() < Self::ENCODED_LEN {
20113            panic!(
20114                "buffer is too small (need {} bytes, but got {})",
20115                Self::ENCODED_LEN,
20116                __tmp.remaining(),
20117            )
20118        }
20119        __tmp.put_f32_le(self.param1);
20120        __tmp.put_f32_le(self.param2);
20121        __tmp.put_f32_le(self.param3);
20122        __tmp.put_f32_le(self.param4);
20123        __tmp.put_f32_le(self.x);
20124        __tmp.put_f32_le(self.y);
20125        __tmp.put_f32_le(self.z);
20126        __tmp.put_u16_le(self.seq);
20127        __tmp.put_u16_le(self.command as u16);
20128        __tmp.put_u8(self.target_system);
20129        __tmp.put_u8(self.target_component);
20130        __tmp.put_u8(self.frame as u8);
20131        __tmp.put_u8(self.current);
20132        __tmp.put_u8(self.autocontinue);
20133        if matches!(version, MavlinkVersion::V2) {
20134            __tmp.put_u8(self.mission_type as u8);
20135            let len = __tmp.len();
20136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20137        } else {
20138            __tmp.len()
20139        }
20140    }
20141}
20142#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20143#[doc = ""]
20144#[doc = "ID: 73"]
20145#[derive(Debug, Clone, PartialEq)]
20146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20148#[cfg_attr(feature = "ts", derive(TS))]
20149#[cfg_attr(feature = "ts", ts(export))]
20150pub struct MISSION_ITEM_INT_DATA {
20151    #[doc = "PARAM1, see MAV_CMD enum"]
20152    pub param1: f32,
20153    #[doc = "PARAM2, see MAV_CMD enum"]
20154    pub param2: f32,
20155    #[doc = "PARAM3, see MAV_CMD enum"]
20156    pub param3: f32,
20157    #[doc = "PARAM4, see MAV_CMD enum"]
20158    pub param4: f32,
20159    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20160    pub x: i32,
20161    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20162    pub y: i32,
20163    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20164    pub z: f32,
20165    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20166    pub seq: u16,
20167    #[doc = "The scheduled action for the waypoint."]
20168    pub command: MavCmd,
20169    #[doc = "System ID"]
20170    pub target_system: u8,
20171    #[doc = "Component ID"]
20172    pub target_component: u8,
20173    #[doc = "The coordinate system of the waypoint."]
20174    pub frame: MavFrame,
20175    #[doc = "false:0, true:1"]
20176    pub current: u8,
20177    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20178    pub autocontinue: u8,
20179    #[doc = "Mission type."]
20180    #[cfg_attr(feature = "serde", serde(default))]
20181    pub mission_type: MavMissionType,
20182}
20183impl MISSION_ITEM_INT_DATA {
20184    pub const ENCODED_LEN: usize = 38usize;
20185    pub const DEFAULT: Self = Self {
20186        param1: 0.0_f32,
20187        param2: 0.0_f32,
20188        param3: 0.0_f32,
20189        param4: 0.0_f32,
20190        x: 0_i32,
20191        y: 0_i32,
20192        z: 0.0_f32,
20193        seq: 0_u16,
20194        command: MavCmd::DEFAULT,
20195        target_system: 0_u8,
20196        target_component: 0_u8,
20197        frame: MavFrame::DEFAULT,
20198        current: 0_u8,
20199        autocontinue: 0_u8,
20200        mission_type: MavMissionType::DEFAULT,
20201    };
20202    #[cfg(feature = "arbitrary")]
20203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20204        use arbitrary::{Arbitrary, Unstructured};
20205        let mut buf = [0u8; 1024];
20206        rng.fill_bytes(&mut buf);
20207        let mut unstructured = Unstructured::new(&buf);
20208        Self::arbitrary(&mut unstructured).unwrap_or_default()
20209    }
20210}
20211impl Default for MISSION_ITEM_INT_DATA {
20212    fn default() -> Self {
20213        Self::DEFAULT.clone()
20214    }
20215}
20216impl MessageData for MISSION_ITEM_INT_DATA {
20217    type Message = MavMessage;
20218    const ID: u32 = 73u32;
20219    const NAME: &'static str = "MISSION_ITEM_INT";
20220    const EXTRA_CRC: u8 = 38u8;
20221    const ENCODED_LEN: usize = 38usize;
20222    fn deser(
20223        _version: MavlinkVersion,
20224        __input: &[u8],
20225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20226        let avail_len = __input.len();
20227        let mut payload_buf = [0; Self::ENCODED_LEN];
20228        let mut buf = if avail_len < Self::ENCODED_LEN {
20229            payload_buf[0..avail_len].copy_from_slice(__input);
20230            Bytes::new(&payload_buf)
20231        } else {
20232            Bytes::new(__input)
20233        };
20234        let mut __struct = Self::default();
20235        __struct.param1 = buf.get_f32_le()?;
20236        __struct.param2 = buf.get_f32_le()?;
20237        __struct.param3 = buf.get_f32_le()?;
20238        __struct.param4 = buf.get_f32_le()?;
20239        __struct.x = buf.get_i32_le()?;
20240        __struct.y = buf.get_i32_le()?;
20241        __struct.z = buf.get_f32_le()?;
20242        __struct.seq = buf.get_u16_le()?;
20243        let tmp = buf.get_u16_le()?;
20244        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20245            ::mavlink_core::error::ParserError::InvalidEnum {
20246                enum_type: "MavCmd",
20247                value: tmp as u64,
20248            },
20249        )?;
20250        __struct.target_system = buf.get_u8()?;
20251        __struct.target_component = buf.get_u8()?;
20252        let tmp = buf.get_u8()?;
20253        __struct.frame =
20254            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20255                enum_type: "MavFrame",
20256                value: tmp as u64,
20257            })?;
20258        __struct.current = buf.get_u8()?;
20259        __struct.autocontinue = buf.get_u8()?;
20260        let tmp = buf.get_u8()?;
20261        __struct.mission_type =
20262            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20263                enum_type: "MavMissionType",
20264                value: tmp as u64,
20265            })?;
20266        Ok(__struct)
20267    }
20268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20269        let mut __tmp = BytesMut::new(bytes);
20270        #[allow(clippy::absurd_extreme_comparisons)]
20271        #[allow(unused_comparisons)]
20272        if __tmp.remaining() < Self::ENCODED_LEN {
20273            panic!(
20274                "buffer is too small (need {} bytes, but got {})",
20275                Self::ENCODED_LEN,
20276                __tmp.remaining(),
20277            )
20278        }
20279        __tmp.put_f32_le(self.param1);
20280        __tmp.put_f32_le(self.param2);
20281        __tmp.put_f32_le(self.param3);
20282        __tmp.put_f32_le(self.param4);
20283        __tmp.put_i32_le(self.x);
20284        __tmp.put_i32_le(self.y);
20285        __tmp.put_f32_le(self.z);
20286        __tmp.put_u16_le(self.seq);
20287        __tmp.put_u16_le(self.command as u16);
20288        __tmp.put_u8(self.target_system);
20289        __tmp.put_u8(self.target_component);
20290        __tmp.put_u8(self.frame as u8);
20291        __tmp.put_u8(self.current);
20292        __tmp.put_u8(self.autocontinue);
20293        if matches!(version, MavlinkVersion::V2) {
20294            __tmp.put_u8(self.mission_type as u8);
20295            let len = __tmp.len();
20296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20297        } else {
20298            __tmp.len()
20299        }
20300    }
20301}
20302#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20303#[doc = ""]
20304#[doc = "ID: 46"]
20305#[derive(Debug, Clone, PartialEq)]
20306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20308#[cfg_attr(feature = "ts", derive(TS))]
20309#[cfg_attr(feature = "ts", ts(export))]
20310pub struct MISSION_ITEM_REACHED_DATA {
20311    #[doc = "Sequence"]
20312    pub seq: u16,
20313}
20314impl MISSION_ITEM_REACHED_DATA {
20315    pub const ENCODED_LEN: usize = 2usize;
20316    pub const DEFAULT: Self = Self { seq: 0_u16 };
20317    #[cfg(feature = "arbitrary")]
20318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20319        use arbitrary::{Arbitrary, Unstructured};
20320        let mut buf = [0u8; 1024];
20321        rng.fill_bytes(&mut buf);
20322        let mut unstructured = Unstructured::new(&buf);
20323        Self::arbitrary(&mut unstructured).unwrap_or_default()
20324    }
20325}
20326impl Default for MISSION_ITEM_REACHED_DATA {
20327    fn default() -> Self {
20328        Self::DEFAULT.clone()
20329    }
20330}
20331impl MessageData for MISSION_ITEM_REACHED_DATA {
20332    type Message = MavMessage;
20333    const ID: u32 = 46u32;
20334    const NAME: &'static str = "MISSION_ITEM_REACHED";
20335    const EXTRA_CRC: u8 = 11u8;
20336    const ENCODED_LEN: usize = 2usize;
20337    fn deser(
20338        _version: MavlinkVersion,
20339        __input: &[u8],
20340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20341        let avail_len = __input.len();
20342        let mut payload_buf = [0; Self::ENCODED_LEN];
20343        let mut buf = if avail_len < Self::ENCODED_LEN {
20344            payload_buf[0..avail_len].copy_from_slice(__input);
20345            Bytes::new(&payload_buf)
20346        } else {
20347            Bytes::new(__input)
20348        };
20349        let mut __struct = Self::default();
20350        __struct.seq = buf.get_u16_le()?;
20351        Ok(__struct)
20352    }
20353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20354        let mut __tmp = BytesMut::new(bytes);
20355        #[allow(clippy::absurd_extreme_comparisons)]
20356        #[allow(unused_comparisons)]
20357        if __tmp.remaining() < Self::ENCODED_LEN {
20358            panic!(
20359                "buffer is too small (need {} bytes, but got {})",
20360                Self::ENCODED_LEN,
20361                __tmp.remaining(),
20362            )
20363        }
20364        __tmp.put_u16_le(self.seq);
20365        if matches!(version, MavlinkVersion::V2) {
20366            let len = __tmp.len();
20367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20368        } else {
20369            __tmp.len()
20370        }
20371    }
20372}
20373#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20374#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20375#[doc = ""]
20376#[doc = "ID: 40"]
20377#[derive(Debug, Clone, PartialEq)]
20378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20380#[cfg_attr(feature = "ts", derive(TS))]
20381#[cfg_attr(feature = "ts", ts(export))]
20382pub struct MISSION_REQUEST_DATA {
20383    #[doc = "Sequence"]
20384    pub seq: u16,
20385    #[doc = "System ID"]
20386    pub target_system: u8,
20387    #[doc = "Component ID"]
20388    pub target_component: u8,
20389    #[doc = "Mission type."]
20390    #[cfg_attr(feature = "serde", serde(default))]
20391    pub mission_type: MavMissionType,
20392}
20393impl MISSION_REQUEST_DATA {
20394    pub const ENCODED_LEN: usize = 5usize;
20395    pub const DEFAULT: Self = Self {
20396        seq: 0_u16,
20397        target_system: 0_u8,
20398        target_component: 0_u8,
20399        mission_type: MavMissionType::DEFAULT,
20400    };
20401    #[cfg(feature = "arbitrary")]
20402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20403        use arbitrary::{Arbitrary, Unstructured};
20404        let mut buf = [0u8; 1024];
20405        rng.fill_bytes(&mut buf);
20406        let mut unstructured = Unstructured::new(&buf);
20407        Self::arbitrary(&mut unstructured).unwrap_or_default()
20408    }
20409}
20410impl Default for MISSION_REQUEST_DATA {
20411    fn default() -> Self {
20412        Self::DEFAULT.clone()
20413    }
20414}
20415impl MessageData for MISSION_REQUEST_DATA {
20416    type Message = MavMessage;
20417    const ID: u32 = 40u32;
20418    const NAME: &'static str = "MISSION_REQUEST";
20419    const EXTRA_CRC: u8 = 230u8;
20420    const ENCODED_LEN: usize = 5usize;
20421    fn deser(
20422        _version: MavlinkVersion,
20423        __input: &[u8],
20424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20425        let avail_len = __input.len();
20426        let mut payload_buf = [0; Self::ENCODED_LEN];
20427        let mut buf = if avail_len < Self::ENCODED_LEN {
20428            payload_buf[0..avail_len].copy_from_slice(__input);
20429            Bytes::new(&payload_buf)
20430        } else {
20431            Bytes::new(__input)
20432        };
20433        let mut __struct = Self::default();
20434        __struct.seq = buf.get_u16_le()?;
20435        __struct.target_system = buf.get_u8()?;
20436        __struct.target_component = buf.get_u8()?;
20437        let tmp = buf.get_u8()?;
20438        __struct.mission_type =
20439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20440                enum_type: "MavMissionType",
20441                value: tmp as u64,
20442            })?;
20443        Ok(__struct)
20444    }
20445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20446        let mut __tmp = BytesMut::new(bytes);
20447        #[allow(clippy::absurd_extreme_comparisons)]
20448        #[allow(unused_comparisons)]
20449        if __tmp.remaining() < Self::ENCODED_LEN {
20450            panic!(
20451                "buffer is too small (need {} bytes, but got {})",
20452                Self::ENCODED_LEN,
20453                __tmp.remaining(),
20454            )
20455        }
20456        __tmp.put_u16_le(self.seq);
20457        __tmp.put_u8(self.target_system);
20458        __tmp.put_u8(self.target_component);
20459        if matches!(version, MavlinkVersion::V2) {
20460            __tmp.put_u8(self.mission_type as u8);
20461            let len = __tmp.len();
20462            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20463        } else {
20464            __tmp.len()
20465        }
20466    }
20467}
20468#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20469#[doc = ""]
20470#[doc = "ID: 51"]
20471#[derive(Debug, Clone, PartialEq)]
20472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20474#[cfg_attr(feature = "ts", derive(TS))]
20475#[cfg_attr(feature = "ts", ts(export))]
20476pub struct MISSION_REQUEST_INT_DATA {
20477    #[doc = "Sequence"]
20478    pub seq: u16,
20479    #[doc = "System ID"]
20480    pub target_system: u8,
20481    #[doc = "Component ID"]
20482    pub target_component: u8,
20483    #[doc = "Mission type."]
20484    #[cfg_attr(feature = "serde", serde(default))]
20485    pub mission_type: MavMissionType,
20486}
20487impl MISSION_REQUEST_INT_DATA {
20488    pub const ENCODED_LEN: usize = 5usize;
20489    pub const DEFAULT: Self = Self {
20490        seq: 0_u16,
20491        target_system: 0_u8,
20492        target_component: 0_u8,
20493        mission_type: MavMissionType::DEFAULT,
20494    };
20495    #[cfg(feature = "arbitrary")]
20496    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20497        use arbitrary::{Arbitrary, Unstructured};
20498        let mut buf = [0u8; 1024];
20499        rng.fill_bytes(&mut buf);
20500        let mut unstructured = Unstructured::new(&buf);
20501        Self::arbitrary(&mut unstructured).unwrap_or_default()
20502    }
20503}
20504impl Default for MISSION_REQUEST_INT_DATA {
20505    fn default() -> Self {
20506        Self::DEFAULT.clone()
20507    }
20508}
20509impl MessageData for MISSION_REQUEST_INT_DATA {
20510    type Message = MavMessage;
20511    const ID: u32 = 51u32;
20512    const NAME: &'static str = "MISSION_REQUEST_INT";
20513    const EXTRA_CRC: u8 = 196u8;
20514    const ENCODED_LEN: usize = 5usize;
20515    fn deser(
20516        _version: MavlinkVersion,
20517        __input: &[u8],
20518    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20519        let avail_len = __input.len();
20520        let mut payload_buf = [0; Self::ENCODED_LEN];
20521        let mut buf = if avail_len < Self::ENCODED_LEN {
20522            payload_buf[0..avail_len].copy_from_slice(__input);
20523            Bytes::new(&payload_buf)
20524        } else {
20525            Bytes::new(__input)
20526        };
20527        let mut __struct = Self::default();
20528        __struct.seq = buf.get_u16_le()?;
20529        __struct.target_system = buf.get_u8()?;
20530        __struct.target_component = buf.get_u8()?;
20531        let tmp = buf.get_u8()?;
20532        __struct.mission_type =
20533            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20534                enum_type: "MavMissionType",
20535                value: tmp as u64,
20536            })?;
20537        Ok(__struct)
20538    }
20539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20540        let mut __tmp = BytesMut::new(bytes);
20541        #[allow(clippy::absurd_extreme_comparisons)]
20542        #[allow(unused_comparisons)]
20543        if __tmp.remaining() < Self::ENCODED_LEN {
20544            panic!(
20545                "buffer is too small (need {} bytes, but got {})",
20546                Self::ENCODED_LEN,
20547                __tmp.remaining(),
20548            )
20549        }
20550        __tmp.put_u16_le(self.seq);
20551        __tmp.put_u8(self.target_system);
20552        __tmp.put_u8(self.target_component);
20553        if matches!(version, MavlinkVersion::V2) {
20554            __tmp.put_u8(self.mission_type as u8);
20555            let len = __tmp.len();
20556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20557        } else {
20558            __tmp.len()
20559        }
20560    }
20561}
20562#[doc = "Request the overall list of mission items from the system/component."]
20563#[doc = ""]
20564#[doc = "ID: 43"]
20565#[derive(Debug, Clone, PartialEq)]
20566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20568#[cfg_attr(feature = "ts", derive(TS))]
20569#[cfg_attr(feature = "ts", ts(export))]
20570pub struct MISSION_REQUEST_LIST_DATA {
20571    #[doc = "System ID"]
20572    pub target_system: u8,
20573    #[doc = "Component ID"]
20574    pub target_component: u8,
20575    #[doc = "Mission type."]
20576    #[cfg_attr(feature = "serde", serde(default))]
20577    pub mission_type: MavMissionType,
20578}
20579impl MISSION_REQUEST_LIST_DATA {
20580    pub const ENCODED_LEN: usize = 3usize;
20581    pub const DEFAULT: Self = Self {
20582        target_system: 0_u8,
20583        target_component: 0_u8,
20584        mission_type: MavMissionType::DEFAULT,
20585    };
20586    #[cfg(feature = "arbitrary")]
20587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20588        use arbitrary::{Arbitrary, Unstructured};
20589        let mut buf = [0u8; 1024];
20590        rng.fill_bytes(&mut buf);
20591        let mut unstructured = Unstructured::new(&buf);
20592        Self::arbitrary(&mut unstructured).unwrap_or_default()
20593    }
20594}
20595impl Default for MISSION_REQUEST_LIST_DATA {
20596    fn default() -> Self {
20597        Self::DEFAULT.clone()
20598    }
20599}
20600impl MessageData for MISSION_REQUEST_LIST_DATA {
20601    type Message = MavMessage;
20602    const ID: u32 = 43u32;
20603    const NAME: &'static str = "MISSION_REQUEST_LIST";
20604    const EXTRA_CRC: u8 = 132u8;
20605    const ENCODED_LEN: usize = 3usize;
20606    fn deser(
20607        _version: MavlinkVersion,
20608        __input: &[u8],
20609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20610        let avail_len = __input.len();
20611        let mut payload_buf = [0; Self::ENCODED_LEN];
20612        let mut buf = if avail_len < Self::ENCODED_LEN {
20613            payload_buf[0..avail_len].copy_from_slice(__input);
20614            Bytes::new(&payload_buf)
20615        } else {
20616            Bytes::new(__input)
20617        };
20618        let mut __struct = Self::default();
20619        __struct.target_system = buf.get_u8()?;
20620        __struct.target_component = buf.get_u8()?;
20621        let tmp = buf.get_u8()?;
20622        __struct.mission_type =
20623            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20624                enum_type: "MavMissionType",
20625                value: tmp as u64,
20626            })?;
20627        Ok(__struct)
20628    }
20629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20630        let mut __tmp = BytesMut::new(bytes);
20631        #[allow(clippy::absurd_extreme_comparisons)]
20632        #[allow(unused_comparisons)]
20633        if __tmp.remaining() < Self::ENCODED_LEN {
20634            panic!(
20635                "buffer is too small (need {} bytes, but got {})",
20636                Self::ENCODED_LEN,
20637                __tmp.remaining(),
20638            )
20639        }
20640        __tmp.put_u8(self.target_system);
20641        __tmp.put_u8(self.target_component);
20642        if matches!(version, MavlinkVersion::V2) {
20643            __tmp.put_u8(self.mission_type as u8);
20644            let len = __tmp.len();
20645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20646        } else {
20647            __tmp.len()
20648        }
20649    }
20650}
20651#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20652#[doc = ""]
20653#[doc = "ID: 37"]
20654#[derive(Debug, Clone, PartialEq)]
20655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20657#[cfg_attr(feature = "ts", derive(TS))]
20658#[cfg_attr(feature = "ts", ts(export))]
20659pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20660    #[doc = "Start index"]
20661    pub start_index: i16,
20662    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20663    pub end_index: i16,
20664    #[doc = "System ID"]
20665    pub target_system: u8,
20666    #[doc = "Component ID"]
20667    pub target_component: u8,
20668    #[doc = "Mission type."]
20669    #[cfg_attr(feature = "serde", serde(default))]
20670    pub mission_type: MavMissionType,
20671}
20672impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20673    pub const ENCODED_LEN: usize = 7usize;
20674    pub const DEFAULT: Self = Self {
20675        start_index: 0_i16,
20676        end_index: 0_i16,
20677        target_system: 0_u8,
20678        target_component: 0_u8,
20679        mission_type: MavMissionType::DEFAULT,
20680    };
20681    #[cfg(feature = "arbitrary")]
20682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20683        use arbitrary::{Arbitrary, Unstructured};
20684        let mut buf = [0u8; 1024];
20685        rng.fill_bytes(&mut buf);
20686        let mut unstructured = Unstructured::new(&buf);
20687        Self::arbitrary(&mut unstructured).unwrap_or_default()
20688    }
20689}
20690impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20691    fn default() -> Self {
20692        Self::DEFAULT.clone()
20693    }
20694}
20695impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20696    type Message = MavMessage;
20697    const ID: u32 = 37u32;
20698    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20699    const EXTRA_CRC: u8 = 212u8;
20700    const ENCODED_LEN: usize = 7usize;
20701    fn deser(
20702        _version: MavlinkVersion,
20703        __input: &[u8],
20704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20705        let avail_len = __input.len();
20706        let mut payload_buf = [0; Self::ENCODED_LEN];
20707        let mut buf = if avail_len < Self::ENCODED_LEN {
20708            payload_buf[0..avail_len].copy_from_slice(__input);
20709            Bytes::new(&payload_buf)
20710        } else {
20711            Bytes::new(__input)
20712        };
20713        let mut __struct = Self::default();
20714        __struct.start_index = buf.get_i16_le()?;
20715        __struct.end_index = buf.get_i16_le()?;
20716        __struct.target_system = buf.get_u8()?;
20717        __struct.target_component = buf.get_u8()?;
20718        let tmp = buf.get_u8()?;
20719        __struct.mission_type =
20720            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20721                enum_type: "MavMissionType",
20722                value: tmp as u64,
20723            })?;
20724        Ok(__struct)
20725    }
20726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20727        let mut __tmp = BytesMut::new(bytes);
20728        #[allow(clippy::absurd_extreme_comparisons)]
20729        #[allow(unused_comparisons)]
20730        if __tmp.remaining() < Self::ENCODED_LEN {
20731            panic!(
20732                "buffer is too small (need {} bytes, but got {})",
20733                Self::ENCODED_LEN,
20734                __tmp.remaining(),
20735            )
20736        }
20737        __tmp.put_i16_le(self.start_index);
20738        __tmp.put_i16_le(self.end_index);
20739        __tmp.put_u8(self.target_system);
20740        __tmp.put_u8(self.target_component);
20741        if matches!(version, MavlinkVersion::V2) {
20742            __tmp.put_u8(self.mission_type as u8);
20743            let len = __tmp.len();
20744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20745        } else {
20746            __tmp.len()
20747        }
20748    }
20749}
20750#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20751#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20752#[doc = ""]
20753#[doc = "ID: 41"]
20754#[derive(Debug, Clone, PartialEq)]
20755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20757#[cfg_attr(feature = "ts", derive(TS))]
20758#[cfg_attr(feature = "ts", ts(export))]
20759pub struct MISSION_SET_CURRENT_DATA {
20760    #[doc = "Sequence"]
20761    pub seq: u16,
20762    #[doc = "System ID"]
20763    pub target_system: u8,
20764    #[doc = "Component ID"]
20765    pub target_component: u8,
20766}
20767impl MISSION_SET_CURRENT_DATA {
20768    pub const ENCODED_LEN: usize = 4usize;
20769    pub const DEFAULT: Self = Self {
20770        seq: 0_u16,
20771        target_system: 0_u8,
20772        target_component: 0_u8,
20773    };
20774    #[cfg(feature = "arbitrary")]
20775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20776        use arbitrary::{Arbitrary, Unstructured};
20777        let mut buf = [0u8; 1024];
20778        rng.fill_bytes(&mut buf);
20779        let mut unstructured = Unstructured::new(&buf);
20780        Self::arbitrary(&mut unstructured).unwrap_or_default()
20781    }
20782}
20783impl Default for MISSION_SET_CURRENT_DATA {
20784    fn default() -> Self {
20785        Self::DEFAULT.clone()
20786    }
20787}
20788impl MessageData for MISSION_SET_CURRENT_DATA {
20789    type Message = MavMessage;
20790    const ID: u32 = 41u32;
20791    const NAME: &'static str = "MISSION_SET_CURRENT";
20792    const EXTRA_CRC: u8 = 28u8;
20793    const ENCODED_LEN: usize = 4usize;
20794    fn deser(
20795        _version: MavlinkVersion,
20796        __input: &[u8],
20797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20798        let avail_len = __input.len();
20799        let mut payload_buf = [0; Self::ENCODED_LEN];
20800        let mut buf = if avail_len < Self::ENCODED_LEN {
20801            payload_buf[0..avail_len].copy_from_slice(__input);
20802            Bytes::new(&payload_buf)
20803        } else {
20804            Bytes::new(__input)
20805        };
20806        let mut __struct = Self::default();
20807        __struct.seq = buf.get_u16_le()?;
20808        __struct.target_system = buf.get_u8()?;
20809        __struct.target_component = buf.get_u8()?;
20810        Ok(__struct)
20811    }
20812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20813        let mut __tmp = BytesMut::new(bytes);
20814        #[allow(clippy::absurd_extreme_comparisons)]
20815        #[allow(unused_comparisons)]
20816        if __tmp.remaining() < Self::ENCODED_LEN {
20817            panic!(
20818                "buffer is too small (need {} bytes, but got {})",
20819                Self::ENCODED_LEN,
20820                __tmp.remaining(),
20821            )
20822        }
20823        __tmp.put_u16_le(self.seq);
20824        __tmp.put_u8(self.target_system);
20825        __tmp.put_u8(self.target_component);
20826        if matches!(version, MavlinkVersion::V2) {
20827            let len = __tmp.len();
20828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20829        } else {
20830            __tmp.len()
20831        }
20832    }
20833}
20834#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20835#[doc = ""]
20836#[doc = "ID: 38"]
20837#[derive(Debug, Clone, PartialEq)]
20838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20839#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20840#[cfg_attr(feature = "ts", derive(TS))]
20841#[cfg_attr(feature = "ts", ts(export))]
20842pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20843    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20844    pub start_index: i16,
20845    #[doc = "End index, equal or greater than start index."]
20846    pub end_index: i16,
20847    #[doc = "System ID"]
20848    pub target_system: u8,
20849    #[doc = "Component ID"]
20850    pub target_component: u8,
20851    #[doc = "Mission type."]
20852    #[cfg_attr(feature = "serde", serde(default))]
20853    pub mission_type: MavMissionType,
20854}
20855impl MISSION_WRITE_PARTIAL_LIST_DATA {
20856    pub const ENCODED_LEN: usize = 7usize;
20857    pub const DEFAULT: Self = Self {
20858        start_index: 0_i16,
20859        end_index: 0_i16,
20860        target_system: 0_u8,
20861        target_component: 0_u8,
20862        mission_type: MavMissionType::DEFAULT,
20863    };
20864    #[cfg(feature = "arbitrary")]
20865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20866        use arbitrary::{Arbitrary, Unstructured};
20867        let mut buf = [0u8; 1024];
20868        rng.fill_bytes(&mut buf);
20869        let mut unstructured = Unstructured::new(&buf);
20870        Self::arbitrary(&mut unstructured).unwrap_or_default()
20871    }
20872}
20873impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20874    fn default() -> Self {
20875        Self::DEFAULT.clone()
20876    }
20877}
20878impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20879    type Message = MavMessage;
20880    const ID: u32 = 38u32;
20881    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20882    const EXTRA_CRC: u8 = 9u8;
20883    const ENCODED_LEN: usize = 7usize;
20884    fn deser(
20885        _version: MavlinkVersion,
20886        __input: &[u8],
20887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20888        let avail_len = __input.len();
20889        let mut payload_buf = [0; Self::ENCODED_LEN];
20890        let mut buf = if avail_len < Self::ENCODED_LEN {
20891            payload_buf[0..avail_len].copy_from_slice(__input);
20892            Bytes::new(&payload_buf)
20893        } else {
20894            Bytes::new(__input)
20895        };
20896        let mut __struct = Self::default();
20897        __struct.start_index = buf.get_i16_le()?;
20898        __struct.end_index = buf.get_i16_le()?;
20899        __struct.target_system = buf.get_u8()?;
20900        __struct.target_component = buf.get_u8()?;
20901        let tmp = buf.get_u8()?;
20902        __struct.mission_type =
20903            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20904                enum_type: "MavMissionType",
20905                value: tmp as u64,
20906            })?;
20907        Ok(__struct)
20908    }
20909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20910        let mut __tmp = BytesMut::new(bytes);
20911        #[allow(clippy::absurd_extreme_comparisons)]
20912        #[allow(unused_comparisons)]
20913        if __tmp.remaining() < Self::ENCODED_LEN {
20914            panic!(
20915                "buffer is too small (need {} bytes, but got {})",
20916                Self::ENCODED_LEN,
20917                __tmp.remaining(),
20918            )
20919        }
20920        __tmp.put_i16_le(self.start_index);
20921        __tmp.put_i16_le(self.end_index);
20922        __tmp.put_u8(self.target_system);
20923        __tmp.put_u8(self.target_component);
20924        if matches!(version, MavlinkVersion::V2) {
20925            __tmp.put_u8(self.mission_type as u8);
20926            let len = __tmp.len();
20927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20928        } else {
20929            __tmp.len()
20930        }
20931    }
20932}
20933#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20934#[doc = "Orientation of a mount."]
20935#[doc = ""]
20936#[doc = "ID: 265"]
20937#[derive(Debug, Clone, PartialEq)]
20938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20940#[cfg_attr(feature = "ts", derive(TS))]
20941#[cfg_attr(feature = "ts", ts(export))]
20942pub struct MOUNT_ORIENTATION_DATA {
20943    #[doc = "Timestamp (time since system boot)."]
20944    pub time_boot_ms: u32,
20945    #[doc = "Roll in global frame (set to NaN for invalid)."]
20946    pub roll: f32,
20947    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20948    pub pitch: f32,
20949    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20950    pub yaw: f32,
20951    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20952    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20953    pub yaw_absolute: f32,
20954}
20955impl MOUNT_ORIENTATION_DATA {
20956    pub const ENCODED_LEN: usize = 20usize;
20957    pub const DEFAULT: Self = Self {
20958        time_boot_ms: 0_u32,
20959        roll: 0.0_f32,
20960        pitch: 0.0_f32,
20961        yaw: 0.0_f32,
20962        yaw_absolute: 0.0_f32,
20963    };
20964    #[cfg(feature = "arbitrary")]
20965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20966        use arbitrary::{Arbitrary, Unstructured};
20967        let mut buf = [0u8; 1024];
20968        rng.fill_bytes(&mut buf);
20969        let mut unstructured = Unstructured::new(&buf);
20970        Self::arbitrary(&mut unstructured).unwrap_or_default()
20971    }
20972}
20973impl Default for MOUNT_ORIENTATION_DATA {
20974    fn default() -> Self {
20975        Self::DEFAULT.clone()
20976    }
20977}
20978impl MessageData for MOUNT_ORIENTATION_DATA {
20979    type Message = MavMessage;
20980    const ID: u32 = 265u32;
20981    const NAME: &'static str = "MOUNT_ORIENTATION";
20982    const EXTRA_CRC: u8 = 26u8;
20983    const ENCODED_LEN: usize = 20usize;
20984    fn deser(
20985        _version: MavlinkVersion,
20986        __input: &[u8],
20987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20988        let avail_len = __input.len();
20989        let mut payload_buf = [0; Self::ENCODED_LEN];
20990        let mut buf = if avail_len < Self::ENCODED_LEN {
20991            payload_buf[0..avail_len].copy_from_slice(__input);
20992            Bytes::new(&payload_buf)
20993        } else {
20994            Bytes::new(__input)
20995        };
20996        let mut __struct = Self::default();
20997        __struct.time_boot_ms = buf.get_u32_le()?;
20998        __struct.roll = buf.get_f32_le()?;
20999        __struct.pitch = buf.get_f32_le()?;
21000        __struct.yaw = buf.get_f32_le()?;
21001        __struct.yaw_absolute = buf.get_f32_le()?;
21002        Ok(__struct)
21003    }
21004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21005        let mut __tmp = BytesMut::new(bytes);
21006        #[allow(clippy::absurd_extreme_comparisons)]
21007        #[allow(unused_comparisons)]
21008        if __tmp.remaining() < Self::ENCODED_LEN {
21009            panic!(
21010                "buffer is too small (need {} bytes, but got {})",
21011                Self::ENCODED_LEN,
21012                __tmp.remaining(),
21013            )
21014        }
21015        __tmp.put_u32_le(self.time_boot_ms);
21016        __tmp.put_f32_le(self.roll);
21017        __tmp.put_f32_le(self.pitch);
21018        __tmp.put_f32_le(self.yaw);
21019        if matches!(version, MavlinkVersion::V2) {
21020            __tmp.put_f32_le(self.yaw_absolute);
21021            let len = __tmp.len();
21022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21023        } else {
21024            __tmp.len()
21025        }
21026    }
21027}
21028#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21029#[doc = ""]
21030#[doc = "ID: 251"]
21031#[derive(Debug, Clone, PartialEq)]
21032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21034#[cfg_attr(feature = "ts", derive(TS))]
21035#[cfg_attr(feature = "ts", ts(export))]
21036pub struct NAMED_VALUE_FLOAT_DATA {
21037    #[doc = "Timestamp (time since system boot)."]
21038    pub time_boot_ms: u32,
21039    #[doc = "Floating point value"]
21040    pub value: f32,
21041    #[doc = "Name of the debug variable"]
21042    #[cfg_attr(feature = "ts", ts(type = "string"))]
21043    pub name: CharArray<10>,
21044}
21045impl NAMED_VALUE_FLOAT_DATA {
21046    pub const ENCODED_LEN: usize = 18usize;
21047    pub const DEFAULT: Self = Self {
21048        time_boot_ms: 0_u32,
21049        value: 0.0_f32,
21050        name: CharArray::new([0_u8; 10usize]),
21051    };
21052    #[cfg(feature = "arbitrary")]
21053    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21054        use arbitrary::{Arbitrary, Unstructured};
21055        let mut buf = [0u8; 1024];
21056        rng.fill_bytes(&mut buf);
21057        let mut unstructured = Unstructured::new(&buf);
21058        Self::arbitrary(&mut unstructured).unwrap_or_default()
21059    }
21060}
21061impl Default for NAMED_VALUE_FLOAT_DATA {
21062    fn default() -> Self {
21063        Self::DEFAULT.clone()
21064    }
21065}
21066impl MessageData for NAMED_VALUE_FLOAT_DATA {
21067    type Message = MavMessage;
21068    const ID: u32 = 251u32;
21069    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21070    const EXTRA_CRC: u8 = 170u8;
21071    const ENCODED_LEN: usize = 18usize;
21072    fn deser(
21073        _version: MavlinkVersion,
21074        __input: &[u8],
21075    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21076        let avail_len = __input.len();
21077        let mut payload_buf = [0; Self::ENCODED_LEN];
21078        let mut buf = if avail_len < Self::ENCODED_LEN {
21079            payload_buf[0..avail_len].copy_from_slice(__input);
21080            Bytes::new(&payload_buf)
21081        } else {
21082            Bytes::new(__input)
21083        };
21084        let mut __struct = Self::default();
21085        __struct.time_boot_ms = buf.get_u32_le()?;
21086        __struct.value = buf.get_f32_le()?;
21087        let mut tmp = [0_u8; 10usize];
21088        for v in &mut tmp {
21089            *v = buf.get_u8()?;
21090        }
21091        __struct.name = CharArray::new(tmp);
21092        Ok(__struct)
21093    }
21094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21095        let mut __tmp = BytesMut::new(bytes);
21096        #[allow(clippy::absurd_extreme_comparisons)]
21097        #[allow(unused_comparisons)]
21098        if __tmp.remaining() < Self::ENCODED_LEN {
21099            panic!(
21100                "buffer is too small (need {} bytes, but got {})",
21101                Self::ENCODED_LEN,
21102                __tmp.remaining(),
21103            )
21104        }
21105        __tmp.put_u32_le(self.time_boot_ms);
21106        __tmp.put_f32_le(self.value);
21107        for val in &self.name {
21108            __tmp.put_u8(*val);
21109        }
21110        if matches!(version, MavlinkVersion::V2) {
21111            let len = __tmp.len();
21112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21113        } else {
21114            __tmp.len()
21115        }
21116    }
21117}
21118#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21119#[doc = ""]
21120#[doc = "ID: 252"]
21121#[derive(Debug, Clone, PartialEq)]
21122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21124#[cfg_attr(feature = "ts", derive(TS))]
21125#[cfg_attr(feature = "ts", ts(export))]
21126pub struct NAMED_VALUE_INT_DATA {
21127    #[doc = "Timestamp (time since system boot)."]
21128    pub time_boot_ms: u32,
21129    #[doc = "Signed integer value"]
21130    pub value: i32,
21131    #[doc = "Name of the debug variable"]
21132    #[cfg_attr(feature = "ts", ts(type = "string"))]
21133    pub name: CharArray<10>,
21134}
21135impl NAMED_VALUE_INT_DATA {
21136    pub const ENCODED_LEN: usize = 18usize;
21137    pub const DEFAULT: Self = Self {
21138        time_boot_ms: 0_u32,
21139        value: 0_i32,
21140        name: CharArray::new([0_u8; 10usize]),
21141    };
21142    #[cfg(feature = "arbitrary")]
21143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21144        use arbitrary::{Arbitrary, Unstructured};
21145        let mut buf = [0u8; 1024];
21146        rng.fill_bytes(&mut buf);
21147        let mut unstructured = Unstructured::new(&buf);
21148        Self::arbitrary(&mut unstructured).unwrap_or_default()
21149    }
21150}
21151impl Default for NAMED_VALUE_INT_DATA {
21152    fn default() -> Self {
21153        Self::DEFAULT.clone()
21154    }
21155}
21156impl MessageData for NAMED_VALUE_INT_DATA {
21157    type Message = MavMessage;
21158    const ID: u32 = 252u32;
21159    const NAME: &'static str = "NAMED_VALUE_INT";
21160    const EXTRA_CRC: u8 = 44u8;
21161    const ENCODED_LEN: usize = 18usize;
21162    fn deser(
21163        _version: MavlinkVersion,
21164        __input: &[u8],
21165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21166        let avail_len = __input.len();
21167        let mut payload_buf = [0; Self::ENCODED_LEN];
21168        let mut buf = if avail_len < Self::ENCODED_LEN {
21169            payload_buf[0..avail_len].copy_from_slice(__input);
21170            Bytes::new(&payload_buf)
21171        } else {
21172            Bytes::new(__input)
21173        };
21174        let mut __struct = Self::default();
21175        __struct.time_boot_ms = buf.get_u32_le()?;
21176        __struct.value = buf.get_i32_le()?;
21177        let mut tmp = [0_u8; 10usize];
21178        for v in &mut tmp {
21179            *v = buf.get_u8()?;
21180        }
21181        __struct.name = CharArray::new(tmp);
21182        Ok(__struct)
21183    }
21184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21185        let mut __tmp = BytesMut::new(bytes);
21186        #[allow(clippy::absurd_extreme_comparisons)]
21187        #[allow(unused_comparisons)]
21188        if __tmp.remaining() < Self::ENCODED_LEN {
21189            panic!(
21190                "buffer is too small (need {} bytes, but got {})",
21191                Self::ENCODED_LEN,
21192                __tmp.remaining(),
21193            )
21194        }
21195        __tmp.put_u32_le(self.time_boot_ms);
21196        __tmp.put_i32_le(self.value);
21197        for val in &self.name {
21198            __tmp.put_u8(*val);
21199        }
21200        if matches!(version, MavlinkVersion::V2) {
21201            let len = __tmp.len();
21202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21203        } else {
21204            __tmp.len()
21205        }
21206    }
21207}
21208#[doc = "The state of the navigation and position controller."]
21209#[doc = ""]
21210#[doc = "ID: 62"]
21211#[derive(Debug, Clone, PartialEq)]
21212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21214#[cfg_attr(feature = "ts", derive(TS))]
21215#[cfg_attr(feature = "ts", ts(export))]
21216pub struct NAV_CONTROLLER_OUTPUT_DATA {
21217    #[doc = "Current desired roll"]
21218    pub nav_roll: f32,
21219    #[doc = "Current desired pitch"]
21220    pub nav_pitch: f32,
21221    #[doc = "Current altitude error"]
21222    pub alt_error: f32,
21223    #[doc = "Current airspeed error"]
21224    pub aspd_error: f32,
21225    #[doc = "Current crosstrack error on x-y plane"]
21226    pub xtrack_error: f32,
21227    #[doc = "Current desired heading"]
21228    pub nav_bearing: i16,
21229    #[doc = "Bearing to current waypoint/target"]
21230    pub target_bearing: i16,
21231    #[doc = "Distance to active waypoint"]
21232    pub wp_dist: u16,
21233}
21234impl NAV_CONTROLLER_OUTPUT_DATA {
21235    pub const ENCODED_LEN: usize = 26usize;
21236    pub const DEFAULT: Self = Self {
21237        nav_roll: 0.0_f32,
21238        nav_pitch: 0.0_f32,
21239        alt_error: 0.0_f32,
21240        aspd_error: 0.0_f32,
21241        xtrack_error: 0.0_f32,
21242        nav_bearing: 0_i16,
21243        target_bearing: 0_i16,
21244        wp_dist: 0_u16,
21245    };
21246    #[cfg(feature = "arbitrary")]
21247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21248        use arbitrary::{Arbitrary, Unstructured};
21249        let mut buf = [0u8; 1024];
21250        rng.fill_bytes(&mut buf);
21251        let mut unstructured = Unstructured::new(&buf);
21252        Self::arbitrary(&mut unstructured).unwrap_or_default()
21253    }
21254}
21255impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21256    fn default() -> Self {
21257        Self::DEFAULT.clone()
21258    }
21259}
21260impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21261    type Message = MavMessage;
21262    const ID: u32 = 62u32;
21263    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21264    const EXTRA_CRC: u8 = 183u8;
21265    const ENCODED_LEN: usize = 26usize;
21266    fn deser(
21267        _version: MavlinkVersion,
21268        __input: &[u8],
21269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21270        let avail_len = __input.len();
21271        let mut payload_buf = [0; Self::ENCODED_LEN];
21272        let mut buf = if avail_len < Self::ENCODED_LEN {
21273            payload_buf[0..avail_len].copy_from_slice(__input);
21274            Bytes::new(&payload_buf)
21275        } else {
21276            Bytes::new(__input)
21277        };
21278        let mut __struct = Self::default();
21279        __struct.nav_roll = buf.get_f32_le()?;
21280        __struct.nav_pitch = buf.get_f32_le()?;
21281        __struct.alt_error = buf.get_f32_le()?;
21282        __struct.aspd_error = buf.get_f32_le()?;
21283        __struct.xtrack_error = buf.get_f32_le()?;
21284        __struct.nav_bearing = buf.get_i16_le()?;
21285        __struct.target_bearing = buf.get_i16_le()?;
21286        __struct.wp_dist = buf.get_u16_le()?;
21287        Ok(__struct)
21288    }
21289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21290        let mut __tmp = BytesMut::new(bytes);
21291        #[allow(clippy::absurd_extreme_comparisons)]
21292        #[allow(unused_comparisons)]
21293        if __tmp.remaining() < Self::ENCODED_LEN {
21294            panic!(
21295                "buffer is too small (need {} bytes, but got {})",
21296                Self::ENCODED_LEN,
21297                __tmp.remaining(),
21298            )
21299        }
21300        __tmp.put_f32_le(self.nav_roll);
21301        __tmp.put_f32_le(self.nav_pitch);
21302        __tmp.put_f32_le(self.alt_error);
21303        __tmp.put_f32_le(self.aspd_error);
21304        __tmp.put_f32_le(self.xtrack_error);
21305        __tmp.put_i16_le(self.nav_bearing);
21306        __tmp.put_i16_le(self.target_bearing);
21307        __tmp.put_u16_le(self.wp_dist);
21308        if matches!(version, MavlinkVersion::V2) {
21309            let len = __tmp.len();
21310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21311        } else {
21312            __tmp.len()
21313        }
21314    }
21315}
21316#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21317#[doc = ""]
21318#[doc = "ID: 330"]
21319#[derive(Debug, Clone, PartialEq)]
21320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21322#[cfg_attr(feature = "ts", derive(TS))]
21323#[cfg_attr(feature = "ts", ts(export))]
21324pub struct OBSTACLE_DISTANCE_DATA {
21325    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21326    pub time_usec: u64,
21327    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21329    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21330    pub distances: [u16; 72],
21331    #[doc = "Minimum distance the sensor can measure."]
21332    pub min_distance: u16,
21333    #[doc = "Maximum distance the sensor can measure."]
21334    pub max_distance: u16,
21335    #[doc = "Class id of the distance sensor type."]
21336    pub sensor_type: MavDistanceSensor,
21337    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21338    pub increment: u8,
21339    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21341    pub increment_f: f32,
21342    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21344    pub angle_offset: f32,
21345    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21346    #[cfg_attr(feature = "serde", serde(default))]
21347    pub frame: MavFrame,
21348}
21349impl OBSTACLE_DISTANCE_DATA {
21350    pub const ENCODED_LEN: usize = 167usize;
21351    pub const DEFAULT: Self = Self {
21352        time_usec: 0_u64,
21353        distances: [0_u16; 72usize],
21354        min_distance: 0_u16,
21355        max_distance: 0_u16,
21356        sensor_type: MavDistanceSensor::DEFAULT,
21357        increment: 0_u8,
21358        increment_f: 0.0_f32,
21359        angle_offset: 0.0_f32,
21360        frame: MavFrame::DEFAULT,
21361    };
21362    #[cfg(feature = "arbitrary")]
21363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21364        use arbitrary::{Arbitrary, Unstructured};
21365        let mut buf = [0u8; 1024];
21366        rng.fill_bytes(&mut buf);
21367        let mut unstructured = Unstructured::new(&buf);
21368        Self::arbitrary(&mut unstructured).unwrap_or_default()
21369    }
21370}
21371impl Default for OBSTACLE_DISTANCE_DATA {
21372    fn default() -> Self {
21373        Self::DEFAULT.clone()
21374    }
21375}
21376impl MessageData for OBSTACLE_DISTANCE_DATA {
21377    type Message = MavMessage;
21378    const ID: u32 = 330u32;
21379    const NAME: &'static str = "OBSTACLE_DISTANCE";
21380    const EXTRA_CRC: u8 = 23u8;
21381    const ENCODED_LEN: usize = 167usize;
21382    fn deser(
21383        _version: MavlinkVersion,
21384        __input: &[u8],
21385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21386        let avail_len = __input.len();
21387        let mut payload_buf = [0; Self::ENCODED_LEN];
21388        let mut buf = if avail_len < Self::ENCODED_LEN {
21389            payload_buf[0..avail_len].copy_from_slice(__input);
21390            Bytes::new(&payload_buf)
21391        } else {
21392            Bytes::new(__input)
21393        };
21394        let mut __struct = Self::default();
21395        __struct.time_usec = buf.get_u64_le()?;
21396        for v in &mut __struct.distances {
21397            let val = buf.get_u16_le()?;
21398            *v = val;
21399        }
21400        __struct.min_distance = buf.get_u16_le()?;
21401        __struct.max_distance = buf.get_u16_le()?;
21402        let tmp = buf.get_u8()?;
21403        __struct.sensor_type =
21404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21405                enum_type: "MavDistanceSensor",
21406                value: tmp as u64,
21407            })?;
21408        __struct.increment = buf.get_u8()?;
21409        __struct.increment_f = buf.get_f32_le()?;
21410        __struct.angle_offset = buf.get_f32_le()?;
21411        let tmp = buf.get_u8()?;
21412        __struct.frame =
21413            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21414                enum_type: "MavFrame",
21415                value: tmp as u64,
21416            })?;
21417        Ok(__struct)
21418    }
21419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21420        let mut __tmp = BytesMut::new(bytes);
21421        #[allow(clippy::absurd_extreme_comparisons)]
21422        #[allow(unused_comparisons)]
21423        if __tmp.remaining() < Self::ENCODED_LEN {
21424            panic!(
21425                "buffer is too small (need {} bytes, but got {})",
21426                Self::ENCODED_LEN,
21427                __tmp.remaining(),
21428            )
21429        }
21430        __tmp.put_u64_le(self.time_usec);
21431        for val in &self.distances {
21432            __tmp.put_u16_le(*val);
21433        }
21434        __tmp.put_u16_le(self.min_distance);
21435        __tmp.put_u16_le(self.max_distance);
21436        __tmp.put_u8(self.sensor_type as u8);
21437        __tmp.put_u8(self.increment);
21438        if matches!(version, MavlinkVersion::V2) {
21439            __tmp.put_f32_le(self.increment_f);
21440            __tmp.put_f32_le(self.angle_offset);
21441            __tmp.put_u8(self.frame as u8);
21442            let len = __tmp.len();
21443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21444        } else {
21445            __tmp.len()
21446        }
21447    }
21448}
21449#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21450#[doc = ""]
21451#[doc = "ID: 331"]
21452#[derive(Debug, Clone, PartialEq)]
21453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21455#[cfg_attr(feature = "ts", derive(TS))]
21456#[cfg_attr(feature = "ts", ts(export))]
21457pub struct ODOMETRY_DATA {
21458    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21459    pub time_usec: u64,
21460    #[doc = "X Position"]
21461    pub x: f32,
21462    #[doc = "Y Position"]
21463    pub y: f32,
21464    #[doc = "Z Position"]
21465    pub z: f32,
21466    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21468    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21469    pub q: [f32; 4],
21470    #[doc = "X linear speed"]
21471    pub vx: f32,
21472    #[doc = "Y linear speed"]
21473    pub vy: f32,
21474    #[doc = "Z linear speed"]
21475    pub vz: f32,
21476    #[doc = "Roll angular speed"]
21477    pub rollspeed: f32,
21478    #[doc = "Pitch angular speed"]
21479    pub pitchspeed: f32,
21480    #[doc = "Yaw angular speed"]
21481    pub yawspeed: f32,
21482    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21485    pub pose_covariance: [f32; 21],
21486    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21489    pub velocity_covariance: [f32; 21],
21490    #[doc = "Coordinate frame of reference for the pose data."]
21491    pub frame_id: MavFrame,
21492    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21493    pub child_frame_id: MavFrame,
21494    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21495    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21496    pub reset_counter: u8,
21497    #[doc = "Type of estimator that is providing the odometry."]
21498    #[cfg_attr(feature = "serde", serde(default))]
21499    pub estimator_type: MavEstimatorType,
21500    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21501    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21502    pub quality: i8,
21503}
21504impl ODOMETRY_DATA {
21505    pub const ENCODED_LEN: usize = 233usize;
21506    pub const DEFAULT: Self = Self {
21507        time_usec: 0_u64,
21508        x: 0.0_f32,
21509        y: 0.0_f32,
21510        z: 0.0_f32,
21511        q: [0.0_f32; 4usize],
21512        vx: 0.0_f32,
21513        vy: 0.0_f32,
21514        vz: 0.0_f32,
21515        rollspeed: 0.0_f32,
21516        pitchspeed: 0.0_f32,
21517        yawspeed: 0.0_f32,
21518        pose_covariance: [0.0_f32; 21usize],
21519        velocity_covariance: [0.0_f32; 21usize],
21520        frame_id: MavFrame::DEFAULT,
21521        child_frame_id: MavFrame::DEFAULT,
21522        reset_counter: 0_u8,
21523        estimator_type: MavEstimatorType::DEFAULT,
21524        quality: 0_i8,
21525    };
21526    #[cfg(feature = "arbitrary")]
21527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21528        use arbitrary::{Arbitrary, Unstructured};
21529        let mut buf = [0u8; 1024];
21530        rng.fill_bytes(&mut buf);
21531        let mut unstructured = Unstructured::new(&buf);
21532        Self::arbitrary(&mut unstructured).unwrap_or_default()
21533    }
21534}
21535impl Default for ODOMETRY_DATA {
21536    fn default() -> Self {
21537        Self::DEFAULT.clone()
21538    }
21539}
21540impl MessageData for ODOMETRY_DATA {
21541    type Message = MavMessage;
21542    const ID: u32 = 331u32;
21543    const NAME: &'static str = "ODOMETRY";
21544    const EXTRA_CRC: u8 = 91u8;
21545    const ENCODED_LEN: usize = 233usize;
21546    fn deser(
21547        _version: MavlinkVersion,
21548        __input: &[u8],
21549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21550        let avail_len = __input.len();
21551        let mut payload_buf = [0; Self::ENCODED_LEN];
21552        let mut buf = if avail_len < Self::ENCODED_LEN {
21553            payload_buf[0..avail_len].copy_from_slice(__input);
21554            Bytes::new(&payload_buf)
21555        } else {
21556            Bytes::new(__input)
21557        };
21558        let mut __struct = Self::default();
21559        __struct.time_usec = buf.get_u64_le()?;
21560        __struct.x = buf.get_f32_le()?;
21561        __struct.y = buf.get_f32_le()?;
21562        __struct.z = buf.get_f32_le()?;
21563        for v in &mut __struct.q {
21564            let val = buf.get_f32_le()?;
21565            *v = val;
21566        }
21567        __struct.vx = buf.get_f32_le()?;
21568        __struct.vy = buf.get_f32_le()?;
21569        __struct.vz = buf.get_f32_le()?;
21570        __struct.rollspeed = buf.get_f32_le()?;
21571        __struct.pitchspeed = buf.get_f32_le()?;
21572        __struct.yawspeed = buf.get_f32_le()?;
21573        for v in &mut __struct.pose_covariance {
21574            let val = buf.get_f32_le()?;
21575            *v = val;
21576        }
21577        for v in &mut __struct.velocity_covariance {
21578            let val = buf.get_f32_le()?;
21579            *v = val;
21580        }
21581        let tmp = buf.get_u8()?;
21582        __struct.frame_id =
21583            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21584                enum_type: "MavFrame",
21585                value: tmp as u64,
21586            })?;
21587        let tmp = buf.get_u8()?;
21588        __struct.child_frame_id =
21589            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21590                enum_type: "MavFrame",
21591                value: tmp as u64,
21592            })?;
21593        __struct.reset_counter = buf.get_u8()?;
21594        let tmp = buf.get_u8()?;
21595        __struct.estimator_type =
21596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21597                enum_type: "MavEstimatorType",
21598                value: tmp as u64,
21599            })?;
21600        __struct.quality = buf.get_i8()?;
21601        Ok(__struct)
21602    }
21603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21604        let mut __tmp = BytesMut::new(bytes);
21605        #[allow(clippy::absurd_extreme_comparisons)]
21606        #[allow(unused_comparisons)]
21607        if __tmp.remaining() < Self::ENCODED_LEN {
21608            panic!(
21609                "buffer is too small (need {} bytes, but got {})",
21610                Self::ENCODED_LEN,
21611                __tmp.remaining(),
21612            )
21613        }
21614        __tmp.put_u64_le(self.time_usec);
21615        __tmp.put_f32_le(self.x);
21616        __tmp.put_f32_le(self.y);
21617        __tmp.put_f32_le(self.z);
21618        for val in &self.q {
21619            __tmp.put_f32_le(*val);
21620        }
21621        __tmp.put_f32_le(self.vx);
21622        __tmp.put_f32_le(self.vy);
21623        __tmp.put_f32_le(self.vz);
21624        __tmp.put_f32_le(self.rollspeed);
21625        __tmp.put_f32_le(self.pitchspeed);
21626        __tmp.put_f32_le(self.yawspeed);
21627        for val in &self.pose_covariance {
21628            __tmp.put_f32_le(*val);
21629        }
21630        for val in &self.velocity_covariance {
21631            __tmp.put_f32_le(*val);
21632        }
21633        __tmp.put_u8(self.frame_id as u8);
21634        __tmp.put_u8(self.child_frame_id as u8);
21635        if matches!(version, MavlinkVersion::V2) {
21636            __tmp.put_u8(self.reset_counter);
21637            __tmp.put_u8(self.estimator_type as u8);
21638            __tmp.put_i8(self.quality);
21639            let len = __tmp.len();
21640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21641        } else {
21642            __tmp.len()
21643        }
21644    }
21645}
21646#[doc = "Hardware status sent by an onboard computer."]
21647#[doc = ""]
21648#[doc = "ID: 390"]
21649#[derive(Debug, Clone, PartialEq)]
21650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21652#[cfg_attr(feature = "ts", derive(TS))]
21653#[cfg_attr(feature = "ts", ts(export))]
21654pub struct ONBOARD_COMPUTER_STATUS_DATA {
21655    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21656    pub time_usec: u64,
21657    #[doc = "Time since system boot."]
21658    pub uptime: u32,
21659    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21660    pub ram_usage: u32,
21661    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21662    pub ram_total: u32,
21663    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21666    pub storage_type: [u32; 4],
21667    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21670    pub storage_usage: [u32; 4],
21671    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21674    pub storage_total: [u32; 4],
21675    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21678    pub link_type: [u32; 6],
21679    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21682    pub link_tx_rate: [u32; 6],
21683    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21686    pub link_rx_rate: [u32; 6],
21687    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21688    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21689    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21690    pub link_tx_max: [u32; 6],
21691    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21692    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21693    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21694    pub link_rx_max: [u32; 6],
21695    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21697    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21698    pub fan_speed: [i16; 4],
21699    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21700    pub mavtype: u8,
21701    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21703    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21704    pub cpu_cores: [u8; 8],
21705    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21708    pub cpu_combined: [u8; 10],
21709    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21710    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21711    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21712    pub gpu_cores: [u8; 4],
21713    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21715    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21716    pub gpu_combined: [u8; 10],
21717    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21718    pub temperature_board: i8,
21719    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21720    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21721    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21722    pub temperature_core: [i8; 8],
21723}
21724impl ONBOARD_COMPUTER_STATUS_DATA {
21725    pub const ENCODED_LEN: usize = 238usize;
21726    pub const DEFAULT: Self = Self {
21727        time_usec: 0_u64,
21728        uptime: 0_u32,
21729        ram_usage: 0_u32,
21730        ram_total: 0_u32,
21731        storage_type: [0_u32; 4usize],
21732        storage_usage: [0_u32; 4usize],
21733        storage_total: [0_u32; 4usize],
21734        link_type: [0_u32; 6usize],
21735        link_tx_rate: [0_u32; 6usize],
21736        link_rx_rate: [0_u32; 6usize],
21737        link_tx_max: [0_u32; 6usize],
21738        link_rx_max: [0_u32; 6usize],
21739        fan_speed: [0_i16; 4usize],
21740        mavtype: 0_u8,
21741        cpu_cores: [0_u8; 8usize],
21742        cpu_combined: [0_u8; 10usize],
21743        gpu_cores: [0_u8; 4usize],
21744        gpu_combined: [0_u8; 10usize],
21745        temperature_board: 0_i8,
21746        temperature_core: [0_i8; 8usize],
21747    };
21748    #[cfg(feature = "arbitrary")]
21749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21750        use arbitrary::{Arbitrary, Unstructured};
21751        let mut buf = [0u8; 1024];
21752        rng.fill_bytes(&mut buf);
21753        let mut unstructured = Unstructured::new(&buf);
21754        Self::arbitrary(&mut unstructured).unwrap_or_default()
21755    }
21756}
21757impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21758    fn default() -> Self {
21759        Self::DEFAULT.clone()
21760    }
21761}
21762impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21763    type Message = MavMessage;
21764    const ID: u32 = 390u32;
21765    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21766    const EXTRA_CRC: u8 = 156u8;
21767    const ENCODED_LEN: usize = 238usize;
21768    fn deser(
21769        _version: MavlinkVersion,
21770        __input: &[u8],
21771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21772        let avail_len = __input.len();
21773        let mut payload_buf = [0; Self::ENCODED_LEN];
21774        let mut buf = if avail_len < Self::ENCODED_LEN {
21775            payload_buf[0..avail_len].copy_from_slice(__input);
21776            Bytes::new(&payload_buf)
21777        } else {
21778            Bytes::new(__input)
21779        };
21780        let mut __struct = Self::default();
21781        __struct.time_usec = buf.get_u64_le()?;
21782        __struct.uptime = buf.get_u32_le()?;
21783        __struct.ram_usage = buf.get_u32_le()?;
21784        __struct.ram_total = buf.get_u32_le()?;
21785        for v in &mut __struct.storage_type {
21786            let val = buf.get_u32_le()?;
21787            *v = val;
21788        }
21789        for v in &mut __struct.storage_usage {
21790            let val = buf.get_u32_le()?;
21791            *v = val;
21792        }
21793        for v in &mut __struct.storage_total {
21794            let val = buf.get_u32_le()?;
21795            *v = val;
21796        }
21797        for v in &mut __struct.link_type {
21798            let val = buf.get_u32_le()?;
21799            *v = val;
21800        }
21801        for v in &mut __struct.link_tx_rate {
21802            let val = buf.get_u32_le()?;
21803            *v = val;
21804        }
21805        for v in &mut __struct.link_rx_rate {
21806            let val = buf.get_u32_le()?;
21807            *v = val;
21808        }
21809        for v in &mut __struct.link_tx_max {
21810            let val = buf.get_u32_le()?;
21811            *v = val;
21812        }
21813        for v in &mut __struct.link_rx_max {
21814            let val = buf.get_u32_le()?;
21815            *v = val;
21816        }
21817        for v in &mut __struct.fan_speed {
21818            let val = buf.get_i16_le()?;
21819            *v = val;
21820        }
21821        __struct.mavtype = buf.get_u8()?;
21822        for v in &mut __struct.cpu_cores {
21823            let val = buf.get_u8()?;
21824            *v = val;
21825        }
21826        for v in &mut __struct.cpu_combined {
21827            let val = buf.get_u8()?;
21828            *v = val;
21829        }
21830        for v in &mut __struct.gpu_cores {
21831            let val = buf.get_u8()?;
21832            *v = val;
21833        }
21834        for v in &mut __struct.gpu_combined {
21835            let val = buf.get_u8()?;
21836            *v = val;
21837        }
21838        __struct.temperature_board = buf.get_i8()?;
21839        for v in &mut __struct.temperature_core {
21840            let val = buf.get_i8()?;
21841            *v = val;
21842        }
21843        Ok(__struct)
21844    }
21845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21846        let mut __tmp = BytesMut::new(bytes);
21847        #[allow(clippy::absurd_extreme_comparisons)]
21848        #[allow(unused_comparisons)]
21849        if __tmp.remaining() < Self::ENCODED_LEN {
21850            panic!(
21851                "buffer is too small (need {} bytes, but got {})",
21852                Self::ENCODED_LEN,
21853                __tmp.remaining(),
21854            )
21855        }
21856        __tmp.put_u64_le(self.time_usec);
21857        __tmp.put_u32_le(self.uptime);
21858        __tmp.put_u32_le(self.ram_usage);
21859        __tmp.put_u32_le(self.ram_total);
21860        for val in &self.storage_type {
21861            __tmp.put_u32_le(*val);
21862        }
21863        for val in &self.storage_usage {
21864            __tmp.put_u32_le(*val);
21865        }
21866        for val in &self.storage_total {
21867            __tmp.put_u32_le(*val);
21868        }
21869        for val in &self.link_type {
21870            __tmp.put_u32_le(*val);
21871        }
21872        for val in &self.link_tx_rate {
21873            __tmp.put_u32_le(*val);
21874        }
21875        for val in &self.link_rx_rate {
21876            __tmp.put_u32_le(*val);
21877        }
21878        for val in &self.link_tx_max {
21879            __tmp.put_u32_le(*val);
21880        }
21881        for val in &self.link_rx_max {
21882            __tmp.put_u32_le(*val);
21883        }
21884        for val in &self.fan_speed {
21885            __tmp.put_i16_le(*val);
21886        }
21887        __tmp.put_u8(self.mavtype);
21888        for val in &self.cpu_cores {
21889            __tmp.put_u8(*val);
21890        }
21891        for val in &self.cpu_combined {
21892            __tmp.put_u8(*val);
21893        }
21894        for val in &self.gpu_cores {
21895            __tmp.put_u8(*val);
21896        }
21897        for val in &self.gpu_combined {
21898            __tmp.put_u8(*val);
21899        }
21900        __tmp.put_i8(self.temperature_board);
21901        for val in &self.temperature_core {
21902            __tmp.put_i8(*val);
21903        }
21904        if matches!(version, MavlinkVersion::V2) {
21905            let len = __tmp.len();
21906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21907        } else {
21908            __tmp.len()
21909        }
21910    }
21911}
21912#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21913#[doc = ""]
21914#[doc = "ID: 12918"]
21915#[derive(Debug, Clone, PartialEq)]
21916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21918#[cfg_attr(feature = "ts", derive(TS))]
21919#[cfg_attr(feature = "ts", ts(export))]
21920pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21921    #[doc = "Status level indicating if arming is allowed."]
21922    pub status: MavOdidArmStatus,
21923    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21924    #[cfg_attr(feature = "ts", ts(type = "string"))]
21925    pub error: CharArray<50>,
21926}
21927impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21928    pub const ENCODED_LEN: usize = 51usize;
21929    pub const DEFAULT: Self = Self {
21930        status: MavOdidArmStatus::DEFAULT,
21931        error: CharArray::new([0_u8; 50usize]),
21932    };
21933    #[cfg(feature = "arbitrary")]
21934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21935        use arbitrary::{Arbitrary, Unstructured};
21936        let mut buf = [0u8; 1024];
21937        rng.fill_bytes(&mut buf);
21938        let mut unstructured = Unstructured::new(&buf);
21939        Self::arbitrary(&mut unstructured).unwrap_or_default()
21940    }
21941}
21942impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21943    fn default() -> Self {
21944        Self::DEFAULT.clone()
21945    }
21946}
21947impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21948    type Message = MavMessage;
21949    const ID: u32 = 12918u32;
21950    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21951    const EXTRA_CRC: u8 = 139u8;
21952    const ENCODED_LEN: usize = 51usize;
21953    fn deser(
21954        _version: MavlinkVersion,
21955        __input: &[u8],
21956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21957        let avail_len = __input.len();
21958        let mut payload_buf = [0; Self::ENCODED_LEN];
21959        let mut buf = if avail_len < Self::ENCODED_LEN {
21960            payload_buf[0..avail_len].copy_from_slice(__input);
21961            Bytes::new(&payload_buf)
21962        } else {
21963            Bytes::new(__input)
21964        };
21965        let mut __struct = Self::default();
21966        let tmp = buf.get_u8()?;
21967        __struct.status =
21968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21969                enum_type: "MavOdidArmStatus",
21970                value: tmp as u64,
21971            })?;
21972        let mut tmp = [0_u8; 50usize];
21973        for v in &mut tmp {
21974            *v = buf.get_u8()?;
21975        }
21976        __struct.error = CharArray::new(tmp);
21977        Ok(__struct)
21978    }
21979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21980        let mut __tmp = BytesMut::new(bytes);
21981        #[allow(clippy::absurd_extreme_comparisons)]
21982        #[allow(unused_comparisons)]
21983        if __tmp.remaining() < Self::ENCODED_LEN {
21984            panic!(
21985                "buffer is too small (need {} bytes, but got {})",
21986                Self::ENCODED_LEN,
21987                __tmp.remaining(),
21988            )
21989        }
21990        __tmp.put_u8(self.status as u8);
21991        for val in &self.error {
21992            __tmp.put_u8(*val);
21993        }
21994        if matches!(version, MavlinkVersion::V2) {
21995            let len = __tmp.len();
21996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21997        } else {
21998            __tmp.len()
21999        }
22000    }
22001}
22002#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22003#[doc = ""]
22004#[doc = "ID: 12902"]
22005#[derive(Debug, Clone, PartialEq)]
22006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22008#[cfg_attr(feature = "ts", derive(TS))]
22009#[cfg_attr(feature = "ts", ts(export))]
22010pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22011    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22012    pub timestamp: u32,
22013    #[doc = "System ID (0 for broadcast)."]
22014    pub target_system: u8,
22015    #[doc = "Component ID (0 for broadcast)."]
22016    pub target_component: u8,
22017    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22020    pub id_or_mac: [u8; 20],
22021    #[doc = "Indicates the type of authentication."]
22022    pub authentication_type: MavOdidAuthType,
22023    #[doc = "Allowed range is 0 - 15."]
22024    pub data_page: u8,
22025    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22026    pub last_page_index: u8,
22027    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22028    pub length: u8,
22029    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22031    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22032    pub authentication_data: [u8; 23],
22033}
22034impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22035    pub const ENCODED_LEN: usize = 53usize;
22036    pub const DEFAULT: Self = Self {
22037        timestamp: 0_u32,
22038        target_system: 0_u8,
22039        target_component: 0_u8,
22040        id_or_mac: [0_u8; 20usize],
22041        authentication_type: MavOdidAuthType::DEFAULT,
22042        data_page: 0_u8,
22043        last_page_index: 0_u8,
22044        length: 0_u8,
22045        authentication_data: [0_u8; 23usize],
22046    };
22047    #[cfg(feature = "arbitrary")]
22048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22049        use arbitrary::{Arbitrary, Unstructured};
22050        let mut buf = [0u8; 1024];
22051        rng.fill_bytes(&mut buf);
22052        let mut unstructured = Unstructured::new(&buf);
22053        Self::arbitrary(&mut unstructured).unwrap_or_default()
22054    }
22055}
22056impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22057    fn default() -> Self {
22058        Self::DEFAULT.clone()
22059    }
22060}
22061impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22062    type Message = MavMessage;
22063    const ID: u32 = 12902u32;
22064    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22065    const EXTRA_CRC: u8 = 140u8;
22066    const ENCODED_LEN: usize = 53usize;
22067    fn deser(
22068        _version: MavlinkVersion,
22069        __input: &[u8],
22070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22071        let avail_len = __input.len();
22072        let mut payload_buf = [0; Self::ENCODED_LEN];
22073        let mut buf = if avail_len < Self::ENCODED_LEN {
22074            payload_buf[0..avail_len].copy_from_slice(__input);
22075            Bytes::new(&payload_buf)
22076        } else {
22077            Bytes::new(__input)
22078        };
22079        let mut __struct = Self::default();
22080        __struct.timestamp = buf.get_u32_le()?;
22081        __struct.target_system = buf.get_u8()?;
22082        __struct.target_component = buf.get_u8()?;
22083        for v in &mut __struct.id_or_mac {
22084            let val = buf.get_u8()?;
22085            *v = val;
22086        }
22087        let tmp = buf.get_u8()?;
22088        __struct.authentication_type =
22089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22090                enum_type: "MavOdidAuthType",
22091                value: tmp as u64,
22092            })?;
22093        __struct.data_page = buf.get_u8()?;
22094        __struct.last_page_index = buf.get_u8()?;
22095        __struct.length = buf.get_u8()?;
22096        for v in &mut __struct.authentication_data {
22097            let val = buf.get_u8()?;
22098            *v = val;
22099        }
22100        Ok(__struct)
22101    }
22102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22103        let mut __tmp = BytesMut::new(bytes);
22104        #[allow(clippy::absurd_extreme_comparisons)]
22105        #[allow(unused_comparisons)]
22106        if __tmp.remaining() < Self::ENCODED_LEN {
22107            panic!(
22108                "buffer is too small (need {} bytes, but got {})",
22109                Self::ENCODED_LEN,
22110                __tmp.remaining(),
22111            )
22112        }
22113        __tmp.put_u32_le(self.timestamp);
22114        __tmp.put_u8(self.target_system);
22115        __tmp.put_u8(self.target_component);
22116        for val in &self.id_or_mac {
22117            __tmp.put_u8(*val);
22118        }
22119        __tmp.put_u8(self.authentication_type as u8);
22120        __tmp.put_u8(self.data_page);
22121        __tmp.put_u8(self.last_page_index);
22122        __tmp.put_u8(self.length);
22123        for val in &self.authentication_data {
22124            __tmp.put_u8(*val);
22125        }
22126        if matches!(version, MavlinkVersion::V2) {
22127            let len = __tmp.len();
22128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22129        } else {
22130            __tmp.len()
22131        }
22132    }
22133}
22134#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22135#[doc = ""]
22136#[doc = "ID: 12900"]
22137#[derive(Debug, Clone, PartialEq)]
22138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22140#[cfg_attr(feature = "ts", derive(TS))]
22141#[cfg_attr(feature = "ts", ts(export))]
22142pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22143    #[doc = "System ID (0 for broadcast)."]
22144    pub target_system: u8,
22145    #[doc = "Component ID (0 for broadcast)."]
22146    pub target_component: u8,
22147    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22149    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22150    pub id_or_mac: [u8; 20],
22151    #[doc = "Indicates the format for the uas_id field of this message."]
22152    pub id_type: MavOdidIdType,
22153    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22154    pub ua_type: MavOdidUaType,
22155    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22156    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22157    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22158    pub uas_id: [u8; 20],
22159}
22160impl OPEN_DRONE_ID_BASIC_ID_DATA {
22161    pub const ENCODED_LEN: usize = 44usize;
22162    pub const DEFAULT: Self = Self {
22163        target_system: 0_u8,
22164        target_component: 0_u8,
22165        id_or_mac: [0_u8; 20usize],
22166        id_type: MavOdidIdType::DEFAULT,
22167        ua_type: MavOdidUaType::DEFAULT,
22168        uas_id: [0_u8; 20usize],
22169    };
22170    #[cfg(feature = "arbitrary")]
22171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22172        use arbitrary::{Arbitrary, Unstructured};
22173        let mut buf = [0u8; 1024];
22174        rng.fill_bytes(&mut buf);
22175        let mut unstructured = Unstructured::new(&buf);
22176        Self::arbitrary(&mut unstructured).unwrap_or_default()
22177    }
22178}
22179impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22180    fn default() -> Self {
22181        Self::DEFAULT.clone()
22182    }
22183}
22184impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22185    type Message = MavMessage;
22186    const ID: u32 = 12900u32;
22187    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22188    const EXTRA_CRC: u8 = 114u8;
22189    const ENCODED_LEN: usize = 44usize;
22190    fn deser(
22191        _version: MavlinkVersion,
22192        __input: &[u8],
22193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22194        let avail_len = __input.len();
22195        let mut payload_buf = [0; Self::ENCODED_LEN];
22196        let mut buf = if avail_len < Self::ENCODED_LEN {
22197            payload_buf[0..avail_len].copy_from_slice(__input);
22198            Bytes::new(&payload_buf)
22199        } else {
22200            Bytes::new(__input)
22201        };
22202        let mut __struct = Self::default();
22203        __struct.target_system = buf.get_u8()?;
22204        __struct.target_component = buf.get_u8()?;
22205        for v in &mut __struct.id_or_mac {
22206            let val = buf.get_u8()?;
22207            *v = val;
22208        }
22209        let tmp = buf.get_u8()?;
22210        __struct.id_type =
22211            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22212                enum_type: "MavOdidIdType",
22213                value: tmp as u64,
22214            })?;
22215        let tmp = buf.get_u8()?;
22216        __struct.ua_type =
22217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22218                enum_type: "MavOdidUaType",
22219                value: tmp as u64,
22220            })?;
22221        for v in &mut __struct.uas_id {
22222            let val = buf.get_u8()?;
22223            *v = val;
22224        }
22225        Ok(__struct)
22226    }
22227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22228        let mut __tmp = BytesMut::new(bytes);
22229        #[allow(clippy::absurd_extreme_comparisons)]
22230        #[allow(unused_comparisons)]
22231        if __tmp.remaining() < Self::ENCODED_LEN {
22232            panic!(
22233                "buffer is too small (need {} bytes, but got {})",
22234                Self::ENCODED_LEN,
22235                __tmp.remaining(),
22236            )
22237        }
22238        __tmp.put_u8(self.target_system);
22239        __tmp.put_u8(self.target_component);
22240        for val in &self.id_or_mac {
22241            __tmp.put_u8(*val);
22242        }
22243        __tmp.put_u8(self.id_type as u8);
22244        __tmp.put_u8(self.ua_type as u8);
22245        for val in &self.uas_id {
22246            __tmp.put_u8(*val);
22247        }
22248        if matches!(version, MavlinkVersion::V2) {
22249            let len = __tmp.len();
22250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22251        } else {
22252            __tmp.len()
22253        }
22254    }
22255}
22256#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22257#[doc = ""]
22258#[doc = "ID: 12901"]
22259#[derive(Debug, Clone, PartialEq)]
22260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22262#[cfg_attr(feature = "ts", derive(TS))]
22263#[cfg_attr(feature = "ts", ts(export))]
22264pub struct OPEN_DRONE_ID_LOCATION_DATA {
22265    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22266    pub latitude: i32,
22267    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22268    pub longitude: i32,
22269    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22270    pub altitude_barometric: f32,
22271    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22272    pub altitude_geodetic: f32,
22273    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22274    pub height: f32,
22275    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22276    pub timestamp: f32,
22277    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22278    pub direction: u16,
22279    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22280    pub speed_horizontal: u16,
22281    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22282    pub speed_vertical: i16,
22283    #[doc = "System ID (0 for broadcast)."]
22284    pub target_system: u8,
22285    #[doc = "Component ID (0 for broadcast)."]
22286    pub target_component: u8,
22287    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22288    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22289    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22290    pub id_or_mac: [u8; 20],
22291    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22292    pub status: MavOdidStatus,
22293    #[doc = "Indicates the reference point for the height field."]
22294    pub height_reference: MavOdidHeightRef,
22295    #[doc = "The accuracy of the horizontal position."]
22296    pub horizontal_accuracy: MavOdidHorAcc,
22297    #[doc = "The accuracy of the vertical position."]
22298    pub vertical_accuracy: MavOdidVerAcc,
22299    #[doc = "The accuracy of the barometric altitude."]
22300    pub barometer_accuracy: MavOdidVerAcc,
22301    #[doc = "The accuracy of the horizontal and vertical speed."]
22302    pub speed_accuracy: MavOdidSpeedAcc,
22303    #[doc = "The accuracy of the timestamps."]
22304    pub timestamp_accuracy: MavOdidTimeAcc,
22305}
22306impl OPEN_DRONE_ID_LOCATION_DATA {
22307    pub const ENCODED_LEN: usize = 59usize;
22308    pub const DEFAULT: Self = Self {
22309        latitude: 0_i32,
22310        longitude: 0_i32,
22311        altitude_barometric: 0.0_f32,
22312        altitude_geodetic: 0.0_f32,
22313        height: 0.0_f32,
22314        timestamp: 0.0_f32,
22315        direction: 0_u16,
22316        speed_horizontal: 0_u16,
22317        speed_vertical: 0_i16,
22318        target_system: 0_u8,
22319        target_component: 0_u8,
22320        id_or_mac: [0_u8; 20usize],
22321        status: MavOdidStatus::DEFAULT,
22322        height_reference: MavOdidHeightRef::DEFAULT,
22323        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22324        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22325        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22326        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22327        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22328    };
22329    #[cfg(feature = "arbitrary")]
22330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22331        use arbitrary::{Arbitrary, Unstructured};
22332        let mut buf = [0u8; 1024];
22333        rng.fill_bytes(&mut buf);
22334        let mut unstructured = Unstructured::new(&buf);
22335        Self::arbitrary(&mut unstructured).unwrap_or_default()
22336    }
22337}
22338impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22339    fn default() -> Self {
22340        Self::DEFAULT.clone()
22341    }
22342}
22343impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22344    type Message = MavMessage;
22345    const ID: u32 = 12901u32;
22346    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22347    const EXTRA_CRC: u8 = 254u8;
22348    const ENCODED_LEN: usize = 59usize;
22349    fn deser(
22350        _version: MavlinkVersion,
22351        __input: &[u8],
22352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22353        let avail_len = __input.len();
22354        let mut payload_buf = [0; Self::ENCODED_LEN];
22355        let mut buf = if avail_len < Self::ENCODED_LEN {
22356            payload_buf[0..avail_len].copy_from_slice(__input);
22357            Bytes::new(&payload_buf)
22358        } else {
22359            Bytes::new(__input)
22360        };
22361        let mut __struct = Self::default();
22362        __struct.latitude = buf.get_i32_le()?;
22363        __struct.longitude = buf.get_i32_le()?;
22364        __struct.altitude_barometric = buf.get_f32_le()?;
22365        __struct.altitude_geodetic = buf.get_f32_le()?;
22366        __struct.height = buf.get_f32_le()?;
22367        __struct.timestamp = buf.get_f32_le()?;
22368        __struct.direction = buf.get_u16_le()?;
22369        __struct.speed_horizontal = buf.get_u16_le()?;
22370        __struct.speed_vertical = buf.get_i16_le()?;
22371        __struct.target_system = buf.get_u8()?;
22372        __struct.target_component = buf.get_u8()?;
22373        for v in &mut __struct.id_or_mac {
22374            let val = buf.get_u8()?;
22375            *v = val;
22376        }
22377        let tmp = buf.get_u8()?;
22378        __struct.status =
22379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22380                enum_type: "MavOdidStatus",
22381                value: tmp as u64,
22382            })?;
22383        let tmp = buf.get_u8()?;
22384        __struct.height_reference =
22385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22386                enum_type: "MavOdidHeightRef",
22387                value: tmp as u64,
22388            })?;
22389        let tmp = buf.get_u8()?;
22390        __struct.horizontal_accuracy =
22391            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22392                enum_type: "MavOdidHorAcc",
22393                value: tmp as u64,
22394            })?;
22395        let tmp = buf.get_u8()?;
22396        __struct.vertical_accuracy =
22397            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22398                enum_type: "MavOdidVerAcc",
22399                value: tmp as u64,
22400            })?;
22401        let tmp = buf.get_u8()?;
22402        __struct.barometer_accuracy =
22403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22404                enum_type: "MavOdidVerAcc",
22405                value: tmp as u64,
22406            })?;
22407        let tmp = buf.get_u8()?;
22408        __struct.speed_accuracy =
22409            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22410                enum_type: "MavOdidSpeedAcc",
22411                value: tmp as u64,
22412            })?;
22413        let tmp = buf.get_u8()?;
22414        __struct.timestamp_accuracy =
22415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22416                enum_type: "MavOdidTimeAcc",
22417                value: tmp as u64,
22418            })?;
22419        Ok(__struct)
22420    }
22421    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22422        let mut __tmp = BytesMut::new(bytes);
22423        #[allow(clippy::absurd_extreme_comparisons)]
22424        #[allow(unused_comparisons)]
22425        if __tmp.remaining() < Self::ENCODED_LEN {
22426            panic!(
22427                "buffer is too small (need {} bytes, but got {})",
22428                Self::ENCODED_LEN,
22429                __tmp.remaining(),
22430            )
22431        }
22432        __tmp.put_i32_le(self.latitude);
22433        __tmp.put_i32_le(self.longitude);
22434        __tmp.put_f32_le(self.altitude_barometric);
22435        __tmp.put_f32_le(self.altitude_geodetic);
22436        __tmp.put_f32_le(self.height);
22437        __tmp.put_f32_le(self.timestamp);
22438        __tmp.put_u16_le(self.direction);
22439        __tmp.put_u16_le(self.speed_horizontal);
22440        __tmp.put_i16_le(self.speed_vertical);
22441        __tmp.put_u8(self.target_system);
22442        __tmp.put_u8(self.target_component);
22443        for val in &self.id_or_mac {
22444            __tmp.put_u8(*val);
22445        }
22446        __tmp.put_u8(self.status as u8);
22447        __tmp.put_u8(self.height_reference as u8);
22448        __tmp.put_u8(self.horizontal_accuracy as u8);
22449        __tmp.put_u8(self.vertical_accuracy as u8);
22450        __tmp.put_u8(self.barometer_accuracy as u8);
22451        __tmp.put_u8(self.speed_accuracy as u8);
22452        __tmp.put_u8(self.timestamp_accuracy as u8);
22453        if matches!(version, MavlinkVersion::V2) {
22454            let len = __tmp.len();
22455            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22456        } else {
22457            __tmp.len()
22458        }
22459    }
22460}
22461#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22462#[doc = ""]
22463#[doc = "ID: 12915"]
22464#[derive(Debug, Clone, PartialEq)]
22465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22466#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22467#[cfg_attr(feature = "ts", derive(TS))]
22468#[cfg_attr(feature = "ts", ts(export))]
22469pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22470    #[doc = "System ID (0 for broadcast)."]
22471    pub target_system: u8,
22472    #[doc = "Component ID (0 for broadcast)."]
22473    pub target_component: u8,
22474    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22477    pub id_or_mac: [u8; 20],
22478    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22479    pub single_message_size: u8,
22480    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22481    pub msg_pack_size: u8,
22482    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22485    pub messages: [u8; 225],
22486}
22487impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22488    pub const ENCODED_LEN: usize = 249usize;
22489    pub const DEFAULT: Self = Self {
22490        target_system: 0_u8,
22491        target_component: 0_u8,
22492        id_or_mac: [0_u8; 20usize],
22493        single_message_size: 0_u8,
22494        msg_pack_size: 0_u8,
22495        messages: [0_u8; 225usize],
22496    };
22497    #[cfg(feature = "arbitrary")]
22498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22499        use arbitrary::{Arbitrary, Unstructured};
22500        let mut buf = [0u8; 1024];
22501        rng.fill_bytes(&mut buf);
22502        let mut unstructured = Unstructured::new(&buf);
22503        Self::arbitrary(&mut unstructured).unwrap_or_default()
22504    }
22505}
22506impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22507    fn default() -> Self {
22508        Self::DEFAULT.clone()
22509    }
22510}
22511impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22512    type Message = MavMessage;
22513    const ID: u32 = 12915u32;
22514    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22515    const EXTRA_CRC: u8 = 94u8;
22516    const ENCODED_LEN: usize = 249usize;
22517    fn deser(
22518        _version: MavlinkVersion,
22519        __input: &[u8],
22520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22521        let avail_len = __input.len();
22522        let mut payload_buf = [0; Self::ENCODED_LEN];
22523        let mut buf = if avail_len < Self::ENCODED_LEN {
22524            payload_buf[0..avail_len].copy_from_slice(__input);
22525            Bytes::new(&payload_buf)
22526        } else {
22527            Bytes::new(__input)
22528        };
22529        let mut __struct = Self::default();
22530        __struct.target_system = buf.get_u8()?;
22531        __struct.target_component = buf.get_u8()?;
22532        for v in &mut __struct.id_or_mac {
22533            let val = buf.get_u8()?;
22534            *v = val;
22535        }
22536        __struct.single_message_size = buf.get_u8()?;
22537        __struct.msg_pack_size = buf.get_u8()?;
22538        for v in &mut __struct.messages {
22539            let val = buf.get_u8()?;
22540            *v = val;
22541        }
22542        Ok(__struct)
22543    }
22544    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22545        let mut __tmp = BytesMut::new(bytes);
22546        #[allow(clippy::absurd_extreme_comparisons)]
22547        #[allow(unused_comparisons)]
22548        if __tmp.remaining() < Self::ENCODED_LEN {
22549            panic!(
22550                "buffer is too small (need {} bytes, but got {})",
22551                Self::ENCODED_LEN,
22552                __tmp.remaining(),
22553            )
22554        }
22555        __tmp.put_u8(self.target_system);
22556        __tmp.put_u8(self.target_component);
22557        for val in &self.id_or_mac {
22558            __tmp.put_u8(*val);
22559        }
22560        __tmp.put_u8(self.single_message_size);
22561        __tmp.put_u8(self.msg_pack_size);
22562        for val in &self.messages {
22563            __tmp.put_u8(*val);
22564        }
22565        if matches!(version, MavlinkVersion::V2) {
22566            let len = __tmp.len();
22567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22568        } else {
22569            __tmp.len()
22570        }
22571    }
22572}
22573#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22574#[doc = ""]
22575#[doc = "ID: 12905"]
22576#[derive(Debug, Clone, PartialEq)]
22577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22579#[cfg_attr(feature = "ts", derive(TS))]
22580#[cfg_attr(feature = "ts", ts(export))]
22581pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22582    #[doc = "System ID (0 for broadcast)."]
22583    pub target_system: u8,
22584    #[doc = "Component ID (0 for broadcast)."]
22585    pub target_component: u8,
22586    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22588    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22589    pub id_or_mac: [u8; 20],
22590    #[doc = "Indicates the type of the operator_id field."]
22591    pub operator_id_type: MavOdidOperatorIdType,
22592    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22593    #[cfg_attr(feature = "ts", ts(type = "string"))]
22594    pub operator_id: CharArray<20>,
22595}
22596impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22597    pub const ENCODED_LEN: usize = 43usize;
22598    pub const DEFAULT: Self = Self {
22599        target_system: 0_u8,
22600        target_component: 0_u8,
22601        id_or_mac: [0_u8; 20usize],
22602        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22603        operator_id: CharArray::new([0_u8; 20usize]),
22604    };
22605    #[cfg(feature = "arbitrary")]
22606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22607        use arbitrary::{Arbitrary, Unstructured};
22608        let mut buf = [0u8; 1024];
22609        rng.fill_bytes(&mut buf);
22610        let mut unstructured = Unstructured::new(&buf);
22611        Self::arbitrary(&mut unstructured).unwrap_or_default()
22612    }
22613}
22614impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22615    fn default() -> Self {
22616        Self::DEFAULT.clone()
22617    }
22618}
22619impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22620    type Message = MavMessage;
22621    const ID: u32 = 12905u32;
22622    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22623    const EXTRA_CRC: u8 = 49u8;
22624    const ENCODED_LEN: usize = 43usize;
22625    fn deser(
22626        _version: MavlinkVersion,
22627        __input: &[u8],
22628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22629        let avail_len = __input.len();
22630        let mut payload_buf = [0; Self::ENCODED_LEN];
22631        let mut buf = if avail_len < Self::ENCODED_LEN {
22632            payload_buf[0..avail_len].copy_from_slice(__input);
22633            Bytes::new(&payload_buf)
22634        } else {
22635            Bytes::new(__input)
22636        };
22637        let mut __struct = Self::default();
22638        __struct.target_system = buf.get_u8()?;
22639        __struct.target_component = buf.get_u8()?;
22640        for v in &mut __struct.id_or_mac {
22641            let val = buf.get_u8()?;
22642            *v = val;
22643        }
22644        let tmp = buf.get_u8()?;
22645        __struct.operator_id_type =
22646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22647                enum_type: "MavOdidOperatorIdType",
22648                value: tmp as u64,
22649            })?;
22650        let mut tmp = [0_u8; 20usize];
22651        for v in &mut tmp {
22652            *v = buf.get_u8()?;
22653        }
22654        __struct.operator_id = CharArray::new(tmp);
22655        Ok(__struct)
22656    }
22657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22658        let mut __tmp = BytesMut::new(bytes);
22659        #[allow(clippy::absurd_extreme_comparisons)]
22660        #[allow(unused_comparisons)]
22661        if __tmp.remaining() < Self::ENCODED_LEN {
22662            panic!(
22663                "buffer is too small (need {} bytes, but got {})",
22664                Self::ENCODED_LEN,
22665                __tmp.remaining(),
22666            )
22667        }
22668        __tmp.put_u8(self.target_system);
22669        __tmp.put_u8(self.target_component);
22670        for val in &self.id_or_mac {
22671            __tmp.put_u8(*val);
22672        }
22673        __tmp.put_u8(self.operator_id_type as u8);
22674        for val in &self.operator_id {
22675            __tmp.put_u8(*val);
22676        }
22677        if matches!(version, MavlinkVersion::V2) {
22678            let len = __tmp.len();
22679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22680        } else {
22681            __tmp.len()
22682        }
22683    }
22684}
22685#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22686#[doc = ""]
22687#[doc = "ID: 12903"]
22688#[derive(Debug, Clone, PartialEq)]
22689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22691#[cfg_attr(feature = "ts", derive(TS))]
22692#[cfg_attr(feature = "ts", ts(export))]
22693pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22694    #[doc = "System ID (0 for broadcast)."]
22695    pub target_system: u8,
22696    #[doc = "Component ID (0 for broadcast)."]
22697    pub target_component: u8,
22698    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22700    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22701    pub id_or_mac: [u8; 20],
22702    #[doc = "Indicates the type of the description field."]
22703    pub description_type: MavOdidDescType,
22704    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22705    #[cfg_attr(feature = "ts", ts(type = "string"))]
22706    pub description: CharArray<23>,
22707}
22708impl OPEN_DRONE_ID_SELF_ID_DATA {
22709    pub const ENCODED_LEN: usize = 46usize;
22710    pub const DEFAULT: Self = Self {
22711        target_system: 0_u8,
22712        target_component: 0_u8,
22713        id_or_mac: [0_u8; 20usize],
22714        description_type: MavOdidDescType::DEFAULT,
22715        description: CharArray::new([0_u8; 23usize]),
22716    };
22717    #[cfg(feature = "arbitrary")]
22718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22719        use arbitrary::{Arbitrary, Unstructured};
22720        let mut buf = [0u8; 1024];
22721        rng.fill_bytes(&mut buf);
22722        let mut unstructured = Unstructured::new(&buf);
22723        Self::arbitrary(&mut unstructured).unwrap_or_default()
22724    }
22725}
22726impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22727    fn default() -> Self {
22728        Self::DEFAULT.clone()
22729    }
22730}
22731impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22732    type Message = MavMessage;
22733    const ID: u32 = 12903u32;
22734    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22735    const EXTRA_CRC: u8 = 249u8;
22736    const ENCODED_LEN: usize = 46usize;
22737    fn deser(
22738        _version: MavlinkVersion,
22739        __input: &[u8],
22740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22741        let avail_len = __input.len();
22742        let mut payload_buf = [0; Self::ENCODED_LEN];
22743        let mut buf = if avail_len < Self::ENCODED_LEN {
22744            payload_buf[0..avail_len].copy_from_slice(__input);
22745            Bytes::new(&payload_buf)
22746        } else {
22747            Bytes::new(__input)
22748        };
22749        let mut __struct = Self::default();
22750        __struct.target_system = buf.get_u8()?;
22751        __struct.target_component = buf.get_u8()?;
22752        for v in &mut __struct.id_or_mac {
22753            let val = buf.get_u8()?;
22754            *v = val;
22755        }
22756        let tmp = buf.get_u8()?;
22757        __struct.description_type =
22758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22759                enum_type: "MavOdidDescType",
22760                value: tmp as u64,
22761            })?;
22762        let mut tmp = [0_u8; 23usize];
22763        for v in &mut tmp {
22764            *v = buf.get_u8()?;
22765        }
22766        __struct.description = CharArray::new(tmp);
22767        Ok(__struct)
22768    }
22769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22770        let mut __tmp = BytesMut::new(bytes);
22771        #[allow(clippy::absurd_extreme_comparisons)]
22772        #[allow(unused_comparisons)]
22773        if __tmp.remaining() < Self::ENCODED_LEN {
22774            panic!(
22775                "buffer is too small (need {} bytes, but got {})",
22776                Self::ENCODED_LEN,
22777                __tmp.remaining(),
22778            )
22779        }
22780        __tmp.put_u8(self.target_system);
22781        __tmp.put_u8(self.target_component);
22782        for val in &self.id_or_mac {
22783            __tmp.put_u8(*val);
22784        }
22785        __tmp.put_u8(self.description_type as u8);
22786        for val in &self.description {
22787            __tmp.put_u8(*val);
22788        }
22789        if matches!(version, MavlinkVersion::V2) {
22790            let len = __tmp.len();
22791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22792        } else {
22793            __tmp.len()
22794        }
22795    }
22796}
22797#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22798#[doc = ""]
22799#[doc = "ID: 12904"]
22800#[derive(Debug, Clone, PartialEq)]
22801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22803#[cfg_attr(feature = "ts", derive(TS))]
22804#[cfg_attr(feature = "ts", ts(export))]
22805pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22806    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22807    pub operator_latitude: i32,
22808    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22809    pub operator_longitude: i32,
22810    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22811    pub area_ceiling: f32,
22812    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22813    pub area_floor: f32,
22814    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22815    pub operator_altitude_geo: f32,
22816    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22817    pub timestamp: u32,
22818    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22819    pub area_count: u16,
22820    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22821    pub area_radius: u16,
22822    #[doc = "System ID (0 for broadcast)."]
22823    pub target_system: u8,
22824    #[doc = "Component ID (0 for broadcast)."]
22825    pub target_component: u8,
22826    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22829    pub id_or_mac: [u8; 20],
22830    #[doc = "Specifies the operator location type."]
22831    pub operator_location_type: MavOdidOperatorLocationType,
22832    #[doc = "Specifies the classification type of the UA."]
22833    pub classification_type: MavOdidClassificationType,
22834    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22835    pub category_eu: MavOdidCategoryEu,
22836    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22837    pub class_eu: MavOdidClassEu,
22838}
22839impl OPEN_DRONE_ID_SYSTEM_DATA {
22840    pub const ENCODED_LEN: usize = 54usize;
22841    pub const DEFAULT: Self = Self {
22842        operator_latitude: 0_i32,
22843        operator_longitude: 0_i32,
22844        area_ceiling: 0.0_f32,
22845        area_floor: 0.0_f32,
22846        operator_altitude_geo: 0.0_f32,
22847        timestamp: 0_u32,
22848        area_count: 0_u16,
22849        area_radius: 0_u16,
22850        target_system: 0_u8,
22851        target_component: 0_u8,
22852        id_or_mac: [0_u8; 20usize],
22853        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22854        classification_type: MavOdidClassificationType::DEFAULT,
22855        category_eu: MavOdidCategoryEu::DEFAULT,
22856        class_eu: MavOdidClassEu::DEFAULT,
22857    };
22858    #[cfg(feature = "arbitrary")]
22859    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22860        use arbitrary::{Arbitrary, Unstructured};
22861        let mut buf = [0u8; 1024];
22862        rng.fill_bytes(&mut buf);
22863        let mut unstructured = Unstructured::new(&buf);
22864        Self::arbitrary(&mut unstructured).unwrap_or_default()
22865    }
22866}
22867impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22868    fn default() -> Self {
22869        Self::DEFAULT.clone()
22870    }
22871}
22872impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22873    type Message = MavMessage;
22874    const ID: u32 = 12904u32;
22875    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22876    const EXTRA_CRC: u8 = 77u8;
22877    const ENCODED_LEN: usize = 54usize;
22878    fn deser(
22879        _version: MavlinkVersion,
22880        __input: &[u8],
22881    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22882        let avail_len = __input.len();
22883        let mut payload_buf = [0; Self::ENCODED_LEN];
22884        let mut buf = if avail_len < Self::ENCODED_LEN {
22885            payload_buf[0..avail_len].copy_from_slice(__input);
22886            Bytes::new(&payload_buf)
22887        } else {
22888            Bytes::new(__input)
22889        };
22890        let mut __struct = Self::default();
22891        __struct.operator_latitude = buf.get_i32_le()?;
22892        __struct.operator_longitude = buf.get_i32_le()?;
22893        __struct.area_ceiling = buf.get_f32_le()?;
22894        __struct.area_floor = buf.get_f32_le()?;
22895        __struct.operator_altitude_geo = buf.get_f32_le()?;
22896        __struct.timestamp = buf.get_u32_le()?;
22897        __struct.area_count = buf.get_u16_le()?;
22898        __struct.area_radius = buf.get_u16_le()?;
22899        __struct.target_system = buf.get_u8()?;
22900        __struct.target_component = buf.get_u8()?;
22901        for v in &mut __struct.id_or_mac {
22902            let val = buf.get_u8()?;
22903            *v = val;
22904        }
22905        let tmp = buf.get_u8()?;
22906        __struct.operator_location_type =
22907            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22908                enum_type: "MavOdidOperatorLocationType",
22909                value: tmp as u64,
22910            })?;
22911        let tmp = buf.get_u8()?;
22912        __struct.classification_type =
22913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22914                enum_type: "MavOdidClassificationType",
22915                value: tmp as u64,
22916            })?;
22917        let tmp = buf.get_u8()?;
22918        __struct.category_eu =
22919            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22920                enum_type: "MavOdidCategoryEu",
22921                value: tmp as u64,
22922            })?;
22923        let tmp = buf.get_u8()?;
22924        __struct.class_eu =
22925            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22926                enum_type: "MavOdidClassEu",
22927                value: tmp as u64,
22928            })?;
22929        Ok(__struct)
22930    }
22931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22932        let mut __tmp = BytesMut::new(bytes);
22933        #[allow(clippy::absurd_extreme_comparisons)]
22934        #[allow(unused_comparisons)]
22935        if __tmp.remaining() < Self::ENCODED_LEN {
22936            panic!(
22937                "buffer is too small (need {} bytes, but got {})",
22938                Self::ENCODED_LEN,
22939                __tmp.remaining(),
22940            )
22941        }
22942        __tmp.put_i32_le(self.operator_latitude);
22943        __tmp.put_i32_le(self.operator_longitude);
22944        __tmp.put_f32_le(self.area_ceiling);
22945        __tmp.put_f32_le(self.area_floor);
22946        __tmp.put_f32_le(self.operator_altitude_geo);
22947        __tmp.put_u32_le(self.timestamp);
22948        __tmp.put_u16_le(self.area_count);
22949        __tmp.put_u16_le(self.area_radius);
22950        __tmp.put_u8(self.target_system);
22951        __tmp.put_u8(self.target_component);
22952        for val in &self.id_or_mac {
22953            __tmp.put_u8(*val);
22954        }
22955        __tmp.put_u8(self.operator_location_type as u8);
22956        __tmp.put_u8(self.classification_type as u8);
22957        __tmp.put_u8(self.category_eu as u8);
22958        __tmp.put_u8(self.class_eu as u8);
22959        if matches!(version, MavlinkVersion::V2) {
22960            let len = __tmp.len();
22961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22962        } else {
22963            __tmp.len()
22964        }
22965    }
22966}
22967#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22968#[doc = ""]
22969#[doc = "ID: 12919"]
22970#[derive(Debug, Clone, PartialEq)]
22971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22973#[cfg_attr(feature = "ts", derive(TS))]
22974#[cfg_attr(feature = "ts", ts(export))]
22975pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22976    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22977    pub operator_latitude: i32,
22978    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22979    pub operator_longitude: i32,
22980    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22981    pub operator_altitude_geo: f32,
22982    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22983    pub timestamp: u32,
22984    #[doc = "System ID (0 for broadcast)."]
22985    pub target_system: u8,
22986    #[doc = "Component ID (0 for broadcast)."]
22987    pub target_component: u8,
22988}
22989impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22990    pub const ENCODED_LEN: usize = 18usize;
22991    pub const DEFAULT: Self = Self {
22992        operator_latitude: 0_i32,
22993        operator_longitude: 0_i32,
22994        operator_altitude_geo: 0.0_f32,
22995        timestamp: 0_u32,
22996        target_system: 0_u8,
22997        target_component: 0_u8,
22998    };
22999    #[cfg(feature = "arbitrary")]
23000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23001        use arbitrary::{Arbitrary, Unstructured};
23002        let mut buf = [0u8; 1024];
23003        rng.fill_bytes(&mut buf);
23004        let mut unstructured = Unstructured::new(&buf);
23005        Self::arbitrary(&mut unstructured).unwrap_or_default()
23006    }
23007}
23008impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23009    fn default() -> Self {
23010        Self::DEFAULT.clone()
23011    }
23012}
23013impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23014    type Message = MavMessage;
23015    const ID: u32 = 12919u32;
23016    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23017    const EXTRA_CRC: u8 = 7u8;
23018    const ENCODED_LEN: usize = 18usize;
23019    fn deser(
23020        _version: MavlinkVersion,
23021        __input: &[u8],
23022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23023        let avail_len = __input.len();
23024        let mut payload_buf = [0; Self::ENCODED_LEN];
23025        let mut buf = if avail_len < Self::ENCODED_LEN {
23026            payload_buf[0..avail_len].copy_from_slice(__input);
23027            Bytes::new(&payload_buf)
23028        } else {
23029            Bytes::new(__input)
23030        };
23031        let mut __struct = Self::default();
23032        __struct.operator_latitude = buf.get_i32_le()?;
23033        __struct.operator_longitude = buf.get_i32_le()?;
23034        __struct.operator_altitude_geo = buf.get_f32_le()?;
23035        __struct.timestamp = buf.get_u32_le()?;
23036        __struct.target_system = buf.get_u8()?;
23037        __struct.target_component = buf.get_u8()?;
23038        Ok(__struct)
23039    }
23040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23041        let mut __tmp = BytesMut::new(bytes);
23042        #[allow(clippy::absurd_extreme_comparisons)]
23043        #[allow(unused_comparisons)]
23044        if __tmp.remaining() < Self::ENCODED_LEN {
23045            panic!(
23046                "buffer is too small (need {} bytes, but got {})",
23047                Self::ENCODED_LEN,
23048                __tmp.remaining(),
23049            )
23050        }
23051        __tmp.put_i32_le(self.operator_latitude);
23052        __tmp.put_i32_le(self.operator_longitude);
23053        __tmp.put_f32_le(self.operator_altitude_geo);
23054        __tmp.put_u32_le(self.timestamp);
23055        __tmp.put_u8(self.target_system);
23056        __tmp.put_u8(self.target_component);
23057        if matches!(version, MavlinkVersion::V2) {
23058            let len = __tmp.len();
23059            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23060        } else {
23061            __tmp.len()
23062        }
23063    }
23064}
23065#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23066#[doc = ""]
23067#[doc = "ID: 100"]
23068#[derive(Debug, Clone, PartialEq)]
23069#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23071#[cfg_attr(feature = "ts", derive(TS))]
23072#[cfg_attr(feature = "ts", ts(export))]
23073pub struct OPTICAL_FLOW_DATA {
23074    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23075    pub time_usec: u64,
23076    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23077    pub flow_comp_m_x: f32,
23078    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23079    pub flow_comp_m_y: f32,
23080    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23081    pub ground_distance: f32,
23082    #[doc = "Flow in x-sensor direction"]
23083    pub flow_x: i16,
23084    #[doc = "Flow in y-sensor direction"]
23085    pub flow_y: i16,
23086    #[doc = "Sensor ID"]
23087    pub sensor_id: u8,
23088    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23089    pub quality: u8,
23090    #[doc = "Flow rate about X axis"]
23091    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23092    pub flow_rate_x: f32,
23093    #[doc = "Flow rate about Y axis"]
23094    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23095    pub flow_rate_y: f32,
23096}
23097impl OPTICAL_FLOW_DATA {
23098    pub const ENCODED_LEN: usize = 34usize;
23099    pub const DEFAULT: Self = Self {
23100        time_usec: 0_u64,
23101        flow_comp_m_x: 0.0_f32,
23102        flow_comp_m_y: 0.0_f32,
23103        ground_distance: 0.0_f32,
23104        flow_x: 0_i16,
23105        flow_y: 0_i16,
23106        sensor_id: 0_u8,
23107        quality: 0_u8,
23108        flow_rate_x: 0.0_f32,
23109        flow_rate_y: 0.0_f32,
23110    };
23111    #[cfg(feature = "arbitrary")]
23112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23113        use arbitrary::{Arbitrary, Unstructured};
23114        let mut buf = [0u8; 1024];
23115        rng.fill_bytes(&mut buf);
23116        let mut unstructured = Unstructured::new(&buf);
23117        Self::arbitrary(&mut unstructured).unwrap_or_default()
23118    }
23119}
23120impl Default for OPTICAL_FLOW_DATA {
23121    fn default() -> Self {
23122        Self::DEFAULT.clone()
23123    }
23124}
23125impl MessageData for OPTICAL_FLOW_DATA {
23126    type Message = MavMessage;
23127    const ID: u32 = 100u32;
23128    const NAME: &'static str = "OPTICAL_FLOW";
23129    const EXTRA_CRC: u8 = 175u8;
23130    const ENCODED_LEN: usize = 34usize;
23131    fn deser(
23132        _version: MavlinkVersion,
23133        __input: &[u8],
23134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23135        let avail_len = __input.len();
23136        let mut payload_buf = [0; Self::ENCODED_LEN];
23137        let mut buf = if avail_len < Self::ENCODED_LEN {
23138            payload_buf[0..avail_len].copy_from_slice(__input);
23139            Bytes::new(&payload_buf)
23140        } else {
23141            Bytes::new(__input)
23142        };
23143        let mut __struct = Self::default();
23144        __struct.time_usec = buf.get_u64_le()?;
23145        __struct.flow_comp_m_x = buf.get_f32_le()?;
23146        __struct.flow_comp_m_y = buf.get_f32_le()?;
23147        __struct.ground_distance = buf.get_f32_le()?;
23148        __struct.flow_x = buf.get_i16_le()?;
23149        __struct.flow_y = buf.get_i16_le()?;
23150        __struct.sensor_id = buf.get_u8()?;
23151        __struct.quality = buf.get_u8()?;
23152        __struct.flow_rate_x = buf.get_f32_le()?;
23153        __struct.flow_rate_y = buf.get_f32_le()?;
23154        Ok(__struct)
23155    }
23156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23157        let mut __tmp = BytesMut::new(bytes);
23158        #[allow(clippy::absurd_extreme_comparisons)]
23159        #[allow(unused_comparisons)]
23160        if __tmp.remaining() < Self::ENCODED_LEN {
23161            panic!(
23162                "buffer is too small (need {} bytes, but got {})",
23163                Self::ENCODED_LEN,
23164                __tmp.remaining(),
23165            )
23166        }
23167        __tmp.put_u64_le(self.time_usec);
23168        __tmp.put_f32_le(self.flow_comp_m_x);
23169        __tmp.put_f32_le(self.flow_comp_m_y);
23170        __tmp.put_f32_le(self.ground_distance);
23171        __tmp.put_i16_le(self.flow_x);
23172        __tmp.put_i16_le(self.flow_y);
23173        __tmp.put_u8(self.sensor_id);
23174        __tmp.put_u8(self.quality);
23175        if matches!(version, MavlinkVersion::V2) {
23176            __tmp.put_f32_le(self.flow_rate_x);
23177            __tmp.put_f32_le(self.flow_rate_y);
23178            let len = __tmp.len();
23179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23180        } else {
23181            __tmp.len()
23182        }
23183    }
23184}
23185#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23186#[doc = ""]
23187#[doc = "ID: 106"]
23188#[derive(Debug, Clone, PartialEq)]
23189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23191#[cfg_attr(feature = "ts", derive(TS))]
23192#[cfg_attr(feature = "ts", ts(export))]
23193pub struct OPTICAL_FLOW_RAD_DATA {
23194    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23195    pub time_usec: u64,
23196    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23197    pub integration_time_us: u32,
23198    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23199    pub integrated_x: f32,
23200    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23201    pub integrated_y: f32,
23202    #[doc = "RH rotation around X axis"]
23203    pub integrated_xgyro: f32,
23204    #[doc = "RH rotation around Y axis"]
23205    pub integrated_ygyro: f32,
23206    #[doc = "RH rotation around Z axis"]
23207    pub integrated_zgyro: f32,
23208    #[doc = "Time since the distance was sampled."]
23209    pub time_delta_distance_us: u32,
23210    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23211    pub distance: f32,
23212    #[doc = "Temperature"]
23213    pub temperature: i16,
23214    #[doc = "Sensor ID"]
23215    pub sensor_id: u8,
23216    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23217    pub quality: u8,
23218}
23219impl OPTICAL_FLOW_RAD_DATA {
23220    pub const ENCODED_LEN: usize = 44usize;
23221    pub const DEFAULT: Self = Self {
23222        time_usec: 0_u64,
23223        integration_time_us: 0_u32,
23224        integrated_x: 0.0_f32,
23225        integrated_y: 0.0_f32,
23226        integrated_xgyro: 0.0_f32,
23227        integrated_ygyro: 0.0_f32,
23228        integrated_zgyro: 0.0_f32,
23229        time_delta_distance_us: 0_u32,
23230        distance: 0.0_f32,
23231        temperature: 0_i16,
23232        sensor_id: 0_u8,
23233        quality: 0_u8,
23234    };
23235    #[cfg(feature = "arbitrary")]
23236    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23237        use arbitrary::{Arbitrary, Unstructured};
23238        let mut buf = [0u8; 1024];
23239        rng.fill_bytes(&mut buf);
23240        let mut unstructured = Unstructured::new(&buf);
23241        Self::arbitrary(&mut unstructured).unwrap_or_default()
23242    }
23243}
23244impl Default for OPTICAL_FLOW_RAD_DATA {
23245    fn default() -> Self {
23246        Self::DEFAULT.clone()
23247    }
23248}
23249impl MessageData for OPTICAL_FLOW_RAD_DATA {
23250    type Message = MavMessage;
23251    const ID: u32 = 106u32;
23252    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23253    const EXTRA_CRC: u8 = 138u8;
23254    const ENCODED_LEN: usize = 44usize;
23255    fn deser(
23256        _version: MavlinkVersion,
23257        __input: &[u8],
23258    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23259        let avail_len = __input.len();
23260        let mut payload_buf = [0; Self::ENCODED_LEN];
23261        let mut buf = if avail_len < Self::ENCODED_LEN {
23262            payload_buf[0..avail_len].copy_from_slice(__input);
23263            Bytes::new(&payload_buf)
23264        } else {
23265            Bytes::new(__input)
23266        };
23267        let mut __struct = Self::default();
23268        __struct.time_usec = buf.get_u64_le()?;
23269        __struct.integration_time_us = buf.get_u32_le()?;
23270        __struct.integrated_x = buf.get_f32_le()?;
23271        __struct.integrated_y = buf.get_f32_le()?;
23272        __struct.integrated_xgyro = buf.get_f32_le()?;
23273        __struct.integrated_ygyro = buf.get_f32_le()?;
23274        __struct.integrated_zgyro = buf.get_f32_le()?;
23275        __struct.time_delta_distance_us = buf.get_u32_le()?;
23276        __struct.distance = buf.get_f32_le()?;
23277        __struct.temperature = buf.get_i16_le()?;
23278        __struct.sensor_id = buf.get_u8()?;
23279        __struct.quality = buf.get_u8()?;
23280        Ok(__struct)
23281    }
23282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23283        let mut __tmp = BytesMut::new(bytes);
23284        #[allow(clippy::absurd_extreme_comparisons)]
23285        #[allow(unused_comparisons)]
23286        if __tmp.remaining() < Self::ENCODED_LEN {
23287            panic!(
23288                "buffer is too small (need {} bytes, but got {})",
23289                Self::ENCODED_LEN,
23290                __tmp.remaining(),
23291            )
23292        }
23293        __tmp.put_u64_le(self.time_usec);
23294        __tmp.put_u32_le(self.integration_time_us);
23295        __tmp.put_f32_le(self.integrated_x);
23296        __tmp.put_f32_le(self.integrated_y);
23297        __tmp.put_f32_le(self.integrated_xgyro);
23298        __tmp.put_f32_le(self.integrated_ygyro);
23299        __tmp.put_f32_le(self.integrated_zgyro);
23300        __tmp.put_u32_le(self.time_delta_distance_us);
23301        __tmp.put_f32_le(self.distance);
23302        __tmp.put_i16_le(self.temperature);
23303        __tmp.put_u8(self.sensor_id);
23304        __tmp.put_u8(self.quality);
23305        if matches!(version, MavlinkVersion::V2) {
23306            let len = __tmp.len();
23307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23308        } else {
23309            __tmp.len()
23310        }
23311    }
23312}
23313#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23314#[doc = ""]
23315#[doc = "ID: 360"]
23316#[derive(Debug, Clone, PartialEq)]
23317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23319#[cfg_attr(feature = "ts", derive(TS))]
23320#[cfg_attr(feature = "ts", ts(export))]
23321pub struct ORBIT_EXECUTION_STATUS_DATA {
23322    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23323    pub time_usec: u64,
23324    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23325    pub radius: f32,
23326    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23327    pub x: i32,
23328    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23329    pub y: i32,
23330    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23331    pub z: f32,
23332    #[doc = "The coordinate system of the fields: x, y, z."]
23333    pub frame: MavFrame,
23334}
23335impl ORBIT_EXECUTION_STATUS_DATA {
23336    pub const ENCODED_LEN: usize = 25usize;
23337    pub const DEFAULT: Self = Self {
23338        time_usec: 0_u64,
23339        radius: 0.0_f32,
23340        x: 0_i32,
23341        y: 0_i32,
23342        z: 0.0_f32,
23343        frame: MavFrame::DEFAULT,
23344    };
23345    #[cfg(feature = "arbitrary")]
23346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23347        use arbitrary::{Arbitrary, Unstructured};
23348        let mut buf = [0u8; 1024];
23349        rng.fill_bytes(&mut buf);
23350        let mut unstructured = Unstructured::new(&buf);
23351        Self::arbitrary(&mut unstructured).unwrap_or_default()
23352    }
23353}
23354impl Default for ORBIT_EXECUTION_STATUS_DATA {
23355    fn default() -> Self {
23356        Self::DEFAULT.clone()
23357    }
23358}
23359impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23360    type Message = MavMessage;
23361    const ID: u32 = 360u32;
23362    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23363    const EXTRA_CRC: u8 = 11u8;
23364    const ENCODED_LEN: usize = 25usize;
23365    fn deser(
23366        _version: MavlinkVersion,
23367        __input: &[u8],
23368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23369        let avail_len = __input.len();
23370        let mut payload_buf = [0; Self::ENCODED_LEN];
23371        let mut buf = if avail_len < Self::ENCODED_LEN {
23372            payload_buf[0..avail_len].copy_from_slice(__input);
23373            Bytes::new(&payload_buf)
23374        } else {
23375            Bytes::new(__input)
23376        };
23377        let mut __struct = Self::default();
23378        __struct.time_usec = buf.get_u64_le()?;
23379        __struct.radius = buf.get_f32_le()?;
23380        __struct.x = buf.get_i32_le()?;
23381        __struct.y = buf.get_i32_le()?;
23382        __struct.z = buf.get_f32_le()?;
23383        let tmp = buf.get_u8()?;
23384        __struct.frame =
23385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23386                enum_type: "MavFrame",
23387                value: tmp as u64,
23388            })?;
23389        Ok(__struct)
23390    }
23391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23392        let mut __tmp = BytesMut::new(bytes);
23393        #[allow(clippy::absurd_extreme_comparisons)]
23394        #[allow(unused_comparisons)]
23395        if __tmp.remaining() < Self::ENCODED_LEN {
23396            panic!(
23397                "buffer is too small (need {} bytes, but got {})",
23398                Self::ENCODED_LEN,
23399                __tmp.remaining(),
23400            )
23401        }
23402        __tmp.put_u64_le(self.time_usec);
23403        __tmp.put_f32_le(self.radius);
23404        __tmp.put_i32_le(self.x);
23405        __tmp.put_i32_le(self.y);
23406        __tmp.put_f32_le(self.z);
23407        __tmp.put_u8(self.frame as u8);
23408        if matches!(version, MavlinkVersion::V2) {
23409            let len = __tmp.len();
23410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23411        } else {
23412            __tmp.len()
23413        }
23414    }
23415}
23416#[doc = "Response from a PARAM_EXT_SET message."]
23417#[doc = ""]
23418#[doc = "ID: 324"]
23419#[derive(Debug, Clone, PartialEq)]
23420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23422#[cfg_attr(feature = "ts", derive(TS))]
23423#[cfg_attr(feature = "ts", ts(export))]
23424pub struct PARAM_EXT_ACK_DATA {
23425    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23426    #[cfg_attr(feature = "ts", ts(type = "string"))]
23427    pub param_id: CharArray<16>,
23428    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23429    #[cfg_attr(feature = "ts", ts(type = "string"))]
23430    pub param_value: CharArray<128>,
23431    #[doc = "Parameter type."]
23432    pub param_type: MavParamExtType,
23433    #[doc = "Result code."]
23434    pub param_result: ParamAck,
23435}
23436impl PARAM_EXT_ACK_DATA {
23437    pub const ENCODED_LEN: usize = 146usize;
23438    pub const DEFAULT: Self = Self {
23439        param_id: CharArray::new([0_u8; 16usize]),
23440        param_value: CharArray::new([0_u8; 128usize]),
23441        param_type: MavParamExtType::DEFAULT,
23442        param_result: ParamAck::DEFAULT,
23443    };
23444    #[cfg(feature = "arbitrary")]
23445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23446        use arbitrary::{Arbitrary, Unstructured};
23447        let mut buf = [0u8; 1024];
23448        rng.fill_bytes(&mut buf);
23449        let mut unstructured = Unstructured::new(&buf);
23450        Self::arbitrary(&mut unstructured).unwrap_or_default()
23451    }
23452}
23453impl Default for PARAM_EXT_ACK_DATA {
23454    fn default() -> Self {
23455        Self::DEFAULT.clone()
23456    }
23457}
23458impl MessageData for PARAM_EXT_ACK_DATA {
23459    type Message = MavMessage;
23460    const ID: u32 = 324u32;
23461    const NAME: &'static str = "PARAM_EXT_ACK";
23462    const EXTRA_CRC: u8 = 132u8;
23463    const ENCODED_LEN: usize = 146usize;
23464    fn deser(
23465        _version: MavlinkVersion,
23466        __input: &[u8],
23467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23468        let avail_len = __input.len();
23469        let mut payload_buf = [0; Self::ENCODED_LEN];
23470        let mut buf = if avail_len < Self::ENCODED_LEN {
23471            payload_buf[0..avail_len].copy_from_slice(__input);
23472            Bytes::new(&payload_buf)
23473        } else {
23474            Bytes::new(__input)
23475        };
23476        let mut __struct = Self::default();
23477        let mut tmp = [0_u8; 16usize];
23478        for v in &mut tmp {
23479            *v = buf.get_u8()?;
23480        }
23481        __struct.param_id = CharArray::new(tmp);
23482        let mut tmp = [0_u8; 128usize];
23483        for v in &mut tmp {
23484            *v = buf.get_u8()?;
23485        }
23486        __struct.param_value = CharArray::new(tmp);
23487        let tmp = buf.get_u8()?;
23488        __struct.param_type =
23489            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23490                enum_type: "MavParamExtType",
23491                value: tmp as u64,
23492            })?;
23493        let tmp = buf.get_u8()?;
23494        __struct.param_result =
23495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23496                enum_type: "ParamAck",
23497                value: tmp as u64,
23498            })?;
23499        Ok(__struct)
23500    }
23501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23502        let mut __tmp = BytesMut::new(bytes);
23503        #[allow(clippy::absurd_extreme_comparisons)]
23504        #[allow(unused_comparisons)]
23505        if __tmp.remaining() < Self::ENCODED_LEN {
23506            panic!(
23507                "buffer is too small (need {} bytes, but got {})",
23508                Self::ENCODED_LEN,
23509                __tmp.remaining(),
23510            )
23511        }
23512        for val in &self.param_id {
23513            __tmp.put_u8(*val);
23514        }
23515        for val in &self.param_value {
23516            __tmp.put_u8(*val);
23517        }
23518        __tmp.put_u8(self.param_type as u8);
23519        __tmp.put_u8(self.param_result as u8);
23520        if matches!(version, MavlinkVersion::V2) {
23521            let len = __tmp.len();
23522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23523        } else {
23524            __tmp.len()
23525        }
23526    }
23527}
23528#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23529#[doc = ""]
23530#[doc = "ID: 321"]
23531#[derive(Debug, Clone, PartialEq)]
23532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23534#[cfg_attr(feature = "ts", derive(TS))]
23535#[cfg_attr(feature = "ts", ts(export))]
23536pub struct PARAM_EXT_REQUEST_LIST_DATA {
23537    #[doc = "System ID"]
23538    pub target_system: u8,
23539    #[doc = "Component ID"]
23540    pub target_component: u8,
23541}
23542impl PARAM_EXT_REQUEST_LIST_DATA {
23543    pub const ENCODED_LEN: usize = 2usize;
23544    pub const DEFAULT: Self = Self {
23545        target_system: 0_u8,
23546        target_component: 0_u8,
23547    };
23548    #[cfg(feature = "arbitrary")]
23549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23550        use arbitrary::{Arbitrary, Unstructured};
23551        let mut buf = [0u8; 1024];
23552        rng.fill_bytes(&mut buf);
23553        let mut unstructured = Unstructured::new(&buf);
23554        Self::arbitrary(&mut unstructured).unwrap_or_default()
23555    }
23556}
23557impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23558    fn default() -> Self {
23559        Self::DEFAULT.clone()
23560    }
23561}
23562impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23563    type Message = MavMessage;
23564    const ID: u32 = 321u32;
23565    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23566    const EXTRA_CRC: u8 = 88u8;
23567    const ENCODED_LEN: usize = 2usize;
23568    fn deser(
23569        _version: MavlinkVersion,
23570        __input: &[u8],
23571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23572        let avail_len = __input.len();
23573        let mut payload_buf = [0; Self::ENCODED_LEN];
23574        let mut buf = if avail_len < Self::ENCODED_LEN {
23575            payload_buf[0..avail_len].copy_from_slice(__input);
23576            Bytes::new(&payload_buf)
23577        } else {
23578            Bytes::new(__input)
23579        };
23580        let mut __struct = Self::default();
23581        __struct.target_system = buf.get_u8()?;
23582        __struct.target_component = buf.get_u8()?;
23583        Ok(__struct)
23584    }
23585    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23586        let mut __tmp = BytesMut::new(bytes);
23587        #[allow(clippy::absurd_extreme_comparisons)]
23588        #[allow(unused_comparisons)]
23589        if __tmp.remaining() < Self::ENCODED_LEN {
23590            panic!(
23591                "buffer is too small (need {} bytes, but got {})",
23592                Self::ENCODED_LEN,
23593                __tmp.remaining(),
23594            )
23595        }
23596        __tmp.put_u8(self.target_system);
23597        __tmp.put_u8(self.target_component);
23598        if matches!(version, MavlinkVersion::V2) {
23599            let len = __tmp.len();
23600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23601        } else {
23602            __tmp.len()
23603        }
23604    }
23605}
23606#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23607#[doc = ""]
23608#[doc = "ID: 320"]
23609#[derive(Debug, Clone, PartialEq)]
23610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23612#[cfg_attr(feature = "ts", derive(TS))]
23613#[cfg_attr(feature = "ts", ts(export))]
23614pub struct PARAM_EXT_REQUEST_READ_DATA {
23615    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23616    pub param_index: i16,
23617    #[doc = "System ID"]
23618    pub target_system: u8,
23619    #[doc = "Component ID"]
23620    pub target_component: u8,
23621    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23622    #[cfg_attr(feature = "ts", ts(type = "string"))]
23623    pub param_id: CharArray<16>,
23624}
23625impl PARAM_EXT_REQUEST_READ_DATA {
23626    pub const ENCODED_LEN: usize = 20usize;
23627    pub const DEFAULT: Self = Self {
23628        param_index: 0_i16,
23629        target_system: 0_u8,
23630        target_component: 0_u8,
23631        param_id: CharArray::new([0_u8; 16usize]),
23632    };
23633    #[cfg(feature = "arbitrary")]
23634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23635        use arbitrary::{Arbitrary, Unstructured};
23636        let mut buf = [0u8; 1024];
23637        rng.fill_bytes(&mut buf);
23638        let mut unstructured = Unstructured::new(&buf);
23639        Self::arbitrary(&mut unstructured).unwrap_or_default()
23640    }
23641}
23642impl Default for PARAM_EXT_REQUEST_READ_DATA {
23643    fn default() -> Self {
23644        Self::DEFAULT.clone()
23645    }
23646}
23647impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23648    type Message = MavMessage;
23649    const ID: u32 = 320u32;
23650    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23651    const EXTRA_CRC: u8 = 243u8;
23652    const ENCODED_LEN: usize = 20usize;
23653    fn deser(
23654        _version: MavlinkVersion,
23655        __input: &[u8],
23656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23657        let avail_len = __input.len();
23658        let mut payload_buf = [0; Self::ENCODED_LEN];
23659        let mut buf = if avail_len < Self::ENCODED_LEN {
23660            payload_buf[0..avail_len].copy_from_slice(__input);
23661            Bytes::new(&payload_buf)
23662        } else {
23663            Bytes::new(__input)
23664        };
23665        let mut __struct = Self::default();
23666        __struct.param_index = buf.get_i16_le()?;
23667        __struct.target_system = buf.get_u8()?;
23668        __struct.target_component = buf.get_u8()?;
23669        let mut tmp = [0_u8; 16usize];
23670        for v in &mut tmp {
23671            *v = buf.get_u8()?;
23672        }
23673        __struct.param_id = CharArray::new(tmp);
23674        Ok(__struct)
23675    }
23676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23677        let mut __tmp = BytesMut::new(bytes);
23678        #[allow(clippy::absurd_extreme_comparisons)]
23679        #[allow(unused_comparisons)]
23680        if __tmp.remaining() < Self::ENCODED_LEN {
23681            panic!(
23682                "buffer is too small (need {} bytes, but got {})",
23683                Self::ENCODED_LEN,
23684                __tmp.remaining(),
23685            )
23686        }
23687        __tmp.put_i16_le(self.param_index);
23688        __tmp.put_u8(self.target_system);
23689        __tmp.put_u8(self.target_component);
23690        for val in &self.param_id {
23691            __tmp.put_u8(*val);
23692        }
23693        if matches!(version, MavlinkVersion::V2) {
23694            let len = __tmp.len();
23695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23696        } else {
23697            __tmp.len()
23698        }
23699    }
23700}
23701#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23702#[doc = ""]
23703#[doc = "ID: 323"]
23704#[derive(Debug, Clone, PartialEq)]
23705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23707#[cfg_attr(feature = "ts", derive(TS))]
23708#[cfg_attr(feature = "ts", ts(export))]
23709pub struct PARAM_EXT_SET_DATA {
23710    #[doc = "System ID"]
23711    pub target_system: u8,
23712    #[doc = "Component ID"]
23713    pub target_component: u8,
23714    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23715    #[cfg_attr(feature = "ts", ts(type = "string"))]
23716    pub param_id: CharArray<16>,
23717    #[doc = "Parameter value"]
23718    #[cfg_attr(feature = "ts", ts(type = "string"))]
23719    pub param_value: CharArray<128>,
23720    #[doc = "Parameter type."]
23721    pub param_type: MavParamExtType,
23722}
23723impl PARAM_EXT_SET_DATA {
23724    pub const ENCODED_LEN: usize = 147usize;
23725    pub const DEFAULT: Self = Self {
23726        target_system: 0_u8,
23727        target_component: 0_u8,
23728        param_id: CharArray::new([0_u8; 16usize]),
23729        param_value: CharArray::new([0_u8; 128usize]),
23730        param_type: MavParamExtType::DEFAULT,
23731    };
23732    #[cfg(feature = "arbitrary")]
23733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23734        use arbitrary::{Arbitrary, Unstructured};
23735        let mut buf = [0u8; 1024];
23736        rng.fill_bytes(&mut buf);
23737        let mut unstructured = Unstructured::new(&buf);
23738        Self::arbitrary(&mut unstructured).unwrap_or_default()
23739    }
23740}
23741impl Default for PARAM_EXT_SET_DATA {
23742    fn default() -> Self {
23743        Self::DEFAULT.clone()
23744    }
23745}
23746impl MessageData for PARAM_EXT_SET_DATA {
23747    type Message = MavMessage;
23748    const ID: u32 = 323u32;
23749    const NAME: &'static str = "PARAM_EXT_SET";
23750    const EXTRA_CRC: u8 = 78u8;
23751    const ENCODED_LEN: usize = 147usize;
23752    fn deser(
23753        _version: MavlinkVersion,
23754        __input: &[u8],
23755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23756        let avail_len = __input.len();
23757        let mut payload_buf = [0; Self::ENCODED_LEN];
23758        let mut buf = if avail_len < Self::ENCODED_LEN {
23759            payload_buf[0..avail_len].copy_from_slice(__input);
23760            Bytes::new(&payload_buf)
23761        } else {
23762            Bytes::new(__input)
23763        };
23764        let mut __struct = Self::default();
23765        __struct.target_system = buf.get_u8()?;
23766        __struct.target_component = buf.get_u8()?;
23767        let mut tmp = [0_u8; 16usize];
23768        for v in &mut tmp {
23769            *v = buf.get_u8()?;
23770        }
23771        __struct.param_id = CharArray::new(tmp);
23772        let mut tmp = [0_u8; 128usize];
23773        for v in &mut tmp {
23774            *v = buf.get_u8()?;
23775        }
23776        __struct.param_value = CharArray::new(tmp);
23777        let tmp = buf.get_u8()?;
23778        __struct.param_type =
23779            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23780                enum_type: "MavParamExtType",
23781                value: tmp as u64,
23782            })?;
23783        Ok(__struct)
23784    }
23785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23786        let mut __tmp = BytesMut::new(bytes);
23787        #[allow(clippy::absurd_extreme_comparisons)]
23788        #[allow(unused_comparisons)]
23789        if __tmp.remaining() < Self::ENCODED_LEN {
23790            panic!(
23791                "buffer is too small (need {} bytes, but got {})",
23792                Self::ENCODED_LEN,
23793                __tmp.remaining(),
23794            )
23795        }
23796        __tmp.put_u8(self.target_system);
23797        __tmp.put_u8(self.target_component);
23798        for val in &self.param_id {
23799            __tmp.put_u8(*val);
23800        }
23801        for val in &self.param_value {
23802            __tmp.put_u8(*val);
23803        }
23804        __tmp.put_u8(self.param_type as u8);
23805        if matches!(version, MavlinkVersion::V2) {
23806            let len = __tmp.len();
23807            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23808        } else {
23809            __tmp.len()
23810        }
23811    }
23812}
23813#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23814#[doc = ""]
23815#[doc = "ID: 322"]
23816#[derive(Debug, Clone, PartialEq)]
23817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23819#[cfg_attr(feature = "ts", derive(TS))]
23820#[cfg_attr(feature = "ts", ts(export))]
23821pub struct PARAM_EXT_VALUE_DATA {
23822    #[doc = "Total number of parameters"]
23823    pub param_count: u16,
23824    #[doc = "Index of this parameter"]
23825    pub param_index: u16,
23826    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23827    #[cfg_attr(feature = "ts", ts(type = "string"))]
23828    pub param_id: CharArray<16>,
23829    #[doc = "Parameter value"]
23830    #[cfg_attr(feature = "ts", ts(type = "string"))]
23831    pub param_value: CharArray<128>,
23832    #[doc = "Parameter type."]
23833    pub param_type: MavParamExtType,
23834}
23835impl PARAM_EXT_VALUE_DATA {
23836    pub const ENCODED_LEN: usize = 149usize;
23837    pub const DEFAULT: Self = Self {
23838        param_count: 0_u16,
23839        param_index: 0_u16,
23840        param_id: CharArray::new([0_u8; 16usize]),
23841        param_value: CharArray::new([0_u8; 128usize]),
23842        param_type: MavParamExtType::DEFAULT,
23843    };
23844    #[cfg(feature = "arbitrary")]
23845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23846        use arbitrary::{Arbitrary, Unstructured};
23847        let mut buf = [0u8; 1024];
23848        rng.fill_bytes(&mut buf);
23849        let mut unstructured = Unstructured::new(&buf);
23850        Self::arbitrary(&mut unstructured).unwrap_or_default()
23851    }
23852}
23853impl Default for PARAM_EXT_VALUE_DATA {
23854    fn default() -> Self {
23855        Self::DEFAULT.clone()
23856    }
23857}
23858impl MessageData for PARAM_EXT_VALUE_DATA {
23859    type Message = MavMessage;
23860    const ID: u32 = 322u32;
23861    const NAME: &'static str = "PARAM_EXT_VALUE";
23862    const EXTRA_CRC: u8 = 243u8;
23863    const ENCODED_LEN: usize = 149usize;
23864    fn deser(
23865        _version: MavlinkVersion,
23866        __input: &[u8],
23867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23868        let avail_len = __input.len();
23869        let mut payload_buf = [0; Self::ENCODED_LEN];
23870        let mut buf = if avail_len < Self::ENCODED_LEN {
23871            payload_buf[0..avail_len].copy_from_slice(__input);
23872            Bytes::new(&payload_buf)
23873        } else {
23874            Bytes::new(__input)
23875        };
23876        let mut __struct = Self::default();
23877        __struct.param_count = buf.get_u16_le()?;
23878        __struct.param_index = buf.get_u16_le()?;
23879        let mut tmp = [0_u8; 16usize];
23880        for v in &mut tmp {
23881            *v = buf.get_u8()?;
23882        }
23883        __struct.param_id = CharArray::new(tmp);
23884        let mut tmp = [0_u8; 128usize];
23885        for v in &mut tmp {
23886            *v = buf.get_u8()?;
23887        }
23888        __struct.param_value = CharArray::new(tmp);
23889        let tmp = buf.get_u8()?;
23890        __struct.param_type =
23891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23892                enum_type: "MavParamExtType",
23893                value: tmp as u64,
23894            })?;
23895        Ok(__struct)
23896    }
23897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23898        let mut __tmp = BytesMut::new(bytes);
23899        #[allow(clippy::absurd_extreme_comparisons)]
23900        #[allow(unused_comparisons)]
23901        if __tmp.remaining() < Self::ENCODED_LEN {
23902            panic!(
23903                "buffer is too small (need {} bytes, but got {})",
23904                Self::ENCODED_LEN,
23905                __tmp.remaining(),
23906            )
23907        }
23908        __tmp.put_u16_le(self.param_count);
23909        __tmp.put_u16_le(self.param_index);
23910        for val in &self.param_id {
23911            __tmp.put_u8(*val);
23912        }
23913        for val in &self.param_value {
23914            __tmp.put_u8(*val);
23915        }
23916        __tmp.put_u8(self.param_type as u8);
23917        if matches!(version, MavlinkVersion::V2) {
23918            let len = __tmp.len();
23919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23920        } else {
23921            __tmp.len()
23922        }
23923    }
23924}
23925#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23926#[doc = ""]
23927#[doc = "ID: 50"]
23928#[derive(Debug, Clone, PartialEq)]
23929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23931#[cfg_attr(feature = "ts", derive(TS))]
23932#[cfg_attr(feature = "ts", ts(export))]
23933pub struct PARAM_MAP_RC_DATA {
23934    #[doc = "Initial parameter value"]
23935    pub param_value0: f32,
23936    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23937    pub scale: f32,
23938    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23939    pub param_value_min: f32,
23940    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23941    pub param_value_max: f32,
23942    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23943    pub param_index: i16,
23944    #[doc = "System ID"]
23945    pub target_system: u8,
23946    #[doc = "Component ID"]
23947    pub target_component: u8,
23948    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23949    #[cfg_attr(feature = "ts", ts(type = "string"))]
23950    pub param_id: CharArray<16>,
23951    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23952    pub parameter_rc_channel_index: u8,
23953}
23954impl PARAM_MAP_RC_DATA {
23955    pub const ENCODED_LEN: usize = 37usize;
23956    pub const DEFAULT: Self = Self {
23957        param_value0: 0.0_f32,
23958        scale: 0.0_f32,
23959        param_value_min: 0.0_f32,
23960        param_value_max: 0.0_f32,
23961        param_index: 0_i16,
23962        target_system: 0_u8,
23963        target_component: 0_u8,
23964        param_id: CharArray::new([0_u8; 16usize]),
23965        parameter_rc_channel_index: 0_u8,
23966    };
23967    #[cfg(feature = "arbitrary")]
23968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23969        use arbitrary::{Arbitrary, Unstructured};
23970        let mut buf = [0u8; 1024];
23971        rng.fill_bytes(&mut buf);
23972        let mut unstructured = Unstructured::new(&buf);
23973        Self::arbitrary(&mut unstructured).unwrap_or_default()
23974    }
23975}
23976impl Default for PARAM_MAP_RC_DATA {
23977    fn default() -> Self {
23978        Self::DEFAULT.clone()
23979    }
23980}
23981impl MessageData for PARAM_MAP_RC_DATA {
23982    type Message = MavMessage;
23983    const ID: u32 = 50u32;
23984    const NAME: &'static str = "PARAM_MAP_RC";
23985    const EXTRA_CRC: u8 = 78u8;
23986    const ENCODED_LEN: usize = 37usize;
23987    fn deser(
23988        _version: MavlinkVersion,
23989        __input: &[u8],
23990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23991        let avail_len = __input.len();
23992        let mut payload_buf = [0; Self::ENCODED_LEN];
23993        let mut buf = if avail_len < Self::ENCODED_LEN {
23994            payload_buf[0..avail_len].copy_from_slice(__input);
23995            Bytes::new(&payload_buf)
23996        } else {
23997            Bytes::new(__input)
23998        };
23999        let mut __struct = Self::default();
24000        __struct.param_value0 = buf.get_f32_le()?;
24001        __struct.scale = buf.get_f32_le()?;
24002        __struct.param_value_min = buf.get_f32_le()?;
24003        __struct.param_value_max = buf.get_f32_le()?;
24004        __struct.param_index = buf.get_i16_le()?;
24005        __struct.target_system = buf.get_u8()?;
24006        __struct.target_component = buf.get_u8()?;
24007        let mut tmp = [0_u8; 16usize];
24008        for v in &mut tmp {
24009            *v = buf.get_u8()?;
24010        }
24011        __struct.param_id = CharArray::new(tmp);
24012        __struct.parameter_rc_channel_index = buf.get_u8()?;
24013        Ok(__struct)
24014    }
24015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24016        let mut __tmp = BytesMut::new(bytes);
24017        #[allow(clippy::absurd_extreme_comparisons)]
24018        #[allow(unused_comparisons)]
24019        if __tmp.remaining() < Self::ENCODED_LEN {
24020            panic!(
24021                "buffer is too small (need {} bytes, but got {})",
24022                Self::ENCODED_LEN,
24023                __tmp.remaining(),
24024            )
24025        }
24026        __tmp.put_f32_le(self.param_value0);
24027        __tmp.put_f32_le(self.scale);
24028        __tmp.put_f32_le(self.param_value_min);
24029        __tmp.put_f32_le(self.param_value_max);
24030        __tmp.put_i16_le(self.param_index);
24031        __tmp.put_u8(self.target_system);
24032        __tmp.put_u8(self.target_component);
24033        for val in &self.param_id {
24034            __tmp.put_u8(*val);
24035        }
24036        __tmp.put_u8(self.parameter_rc_channel_index);
24037        if matches!(version, MavlinkVersion::V2) {
24038            let len = __tmp.len();
24039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24040        } else {
24041            __tmp.len()
24042        }
24043    }
24044}
24045#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24046#[doc = ""]
24047#[doc = "ID: 21"]
24048#[derive(Debug, Clone, PartialEq)]
24049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24051#[cfg_attr(feature = "ts", derive(TS))]
24052#[cfg_attr(feature = "ts", ts(export))]
24053pub struct PARAM_REQUEST_LIST_DATA {
24054    #[doc = "System ID"]
24055    pub target_system: u8,
24056    #[doc = "Component ID"]
24057    pub target_component: u8,
24058}
24059impl PARAM_REQUEST_LIST_DATA {
24060    pub const ENCODED_LEN: usize = 2usize;
24061    pub const DEFAULT: Self = Self {
24062        target_system: 0_u8,
24063        target_component: 0_u8,
24064    };
24065    #[cfg(feature = "arbitrary")]
24066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24067        use arbitrary::{Arbitrary, Unstructured};
24068        let mut buf = [0u8; 1024];
24069        rng.fill_bytes(&mut buf);
24070        let mut unstructured = Unstructured::new(&buf);
24071        Self::arbitrary(&mut unstructured).unwrap_or_default()
24072    }
24073}
24074impl Default for PARAM_REQUEST_LIST_DATA {
24075    fn default() -> Self {
24076        Self::DEFAULT.clone()
24077    }
24078}
24079impl MessageData for PARAM_REQUEST_LIST_DATA {
24080    type Message = MavMessage;
24081    const ID: u32 = 21u32;
24082    const NAME: &'static str = "PARAM_REQUEST_LIST";
24083    const EXTRA_CRC: u8 = 159u8;
24084    const ENCODED_LEN: usize = 2usize;
24085    fn deser(
24086        _version: MavlinkVersion,
24087        __input: &[u8],
24088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24089        let avail_len = __input.len();
24090        let mut payload_buf = [0; Self::ENCODED_LEN];
24091        let mut buf = if avail_len < Self::ENCODED_LEN {
24092            payload_buf[0..avail_len].copy_from_slice(__input);
24093            Bytes::new(&payload_buf)
24094        } else {
24095            Bytes::new(__input)
24096        };
24097        let mut __struct = Self::default();
24098        __struct.target_system = buf.get_u8()?;
24099        __struct.target_component = buf.get_u8()?;
24100        Ok(__struct)
24101    }
24102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24103        let mut __tmp = BytesMut::new(bytes);
24104        #[allow(clippy::absurd_extreme_comparisons)]
24105        #[allow(unused_comparisons)]
24106        if __tmp.remaining() < Self::ENCODED_LEN {
24107            panic!(
24108                "buffer is too small (need {} bytes, but got {})",
24109                Self::ENCODED_LEN,
24110                __tmp.remaining(),
24111            )
24112        }
24113        __tmp.put_u8(self.target_system);
24114        __tmp.put_u8(self.target_component);
24115        if matches!(version, MavlinkVersion::V2) {
24116            let len = __tmp.len();
24117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24118        } else {
24119            __tmp.len()
24120        }
24121    }
24122}
24123#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24124#[doc = ""]
24125#[doc = "ID: 20"]
24126#[derive(Debug, Clone, PartialEq)]
24127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24129#[cfg_attr(feature = "ts", derive(TS))]
24130#[cfg_attr(feature = "ts", ts(export))]
24131pub struct PARAM_REQUEST_READ_DATA {
24132    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24133    pub param_index: i16,
24134    #[doc = "System ID"]
24135    pub target_system: u8,
24136    #[doc = "Component ID"]
24137    pub target_component: u8,
24138    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24139    #[cfg_attr(feature = "ts", ts(type = "string"))]
24140    pub param_id: CharArray<16>,
24141}
24142impl PARAM_REQUEST_READ_DATA {
24143    pub const ENCODED_LEN: usize = 20usize;
24144    pub const DEFAULT: Self = Self {
24145        param_index: 0_i16,
24146        target_system: 0_u8,
24147        target_component: 0_u8,
24148        param_id: CharArray::new([0_u8; 16usize]),
24149    };
24150    #[cfg(feature = "arbitrary")]
24151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24152        use arbitrary::{Arbitrary, Unstructured};
24153        let mut buf = [0u8; 1024];
24154        rng.fill_bytes(&mut buf);
24155        let mut unstructured = Unstructured::new(&buf);
24156        Self::arbitrary(&mut unstructured).unwrap_or_default()
24157    }
24158}
24159impl Default for PARAM_REQUEST_READ_DATA {
24160    fn default() -> Self {
24161        Self::DEFAULT.clone()
24162    }
24163}
24164impl MessageData for PARAM_REQUEST_READ_DATA {
24165    type Message = MavMessage;
24166    const ID: u32 = 20u32;
24167    const NAME: &'static str = "PARAM_REQUEST_READ";
24168    const EXTRA_CRC: u8 = 214u8;
24169    const ENCODED_LEN: usize = 20usize;
24170    fn deser(
24171        _version: MavlinkVersion,
24172        __input: &[u8],
24173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24174        let avail_len = __input.len();
24175        let mut payload_buf = [0; Self::ENCODED_LEN];
24176        let mut buf = if avail_len < Self::ENCODED_LEN {
24177            payload_buf[0..avail_len].copy_from_slice(__input);
24178            Bytes::new(&payload_buf)
24179        } else {
24180            Bytes::new(__input)
24181        };
24182        let mut __struct = Self::default();
24183        __struct.param_index = buf.get_i16_le()?;
24184        __struct.target_system = buf.get_u8()?;
24185        __struct.target_component = buf.get_u8()?;
24186        let mut tmp = [0_u8; 16usize];
24187        for v in &mut tmp {
24188            *v = buf.get_u8()?;
24189        }
24190        __struct.param_id = CharArray::new(tmp);
24191        Ok(__struct)
24192    }
24193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24194        let mut __tmp = BytesMut::new(bytes);
24195        #[allow(clippy::absurd_extreme_comparisons)]
24196        #[allow(unused_comparisons)]
24197        if __tmp.remaining() < Self::ENCODED_LEN {
24198            panic!(
24199                "buffer is too small (need {} bytes, but got {})",
24200                Self::ENCODED_LEN,
24201                __tmp.remaining(),
24202            )
24203        }
24204        __tmp.put_i16_le(self.param_index);
24205        __tmp.put_u8(self.target_system);
24206        __tmp.put_u8(self.target_component);
24207        for val in &self.param_id {
24208            __tmp.put_u8(*val);
24209        }
24210        if matches!(version, MavlinkVersion::V2) {
24211            let len = __tmp.len();
24212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24213        } else {
24214            __tmp.len()
24215        }
24216    }
24217}
24218#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24219#[doc = ""]
24220#[doc = "ID: 23"]
24221#[derive(Debug, Clone, PartialEq)]
24222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24224#[cfg_attr(feature = "ts", derive(TS))]
24225#[cfg_attr(feature = "ts", ts(export))]
24226pub struct PARAM_SET_DATA {
24227    #[doc = "Onboard parameter value"]
24228    pub param_value: f32,
24229    #[doc = "System ID"]
24230    pub target_system: u8,
24231    #[doc = "Component ID"]
24232    pub target_component: u8,
24233    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24234    #[cfg_attr(feature = "ts", ts(type = "string"))]
24235    pub param_id: CharArray<16>,
24236    #[doc = "Onboard parameter type."]
24237    pub param_type: MavParamType,
24238}
24239impl PARAM_SET_DATA {
24240    pub const ENCODED_LEN: usize = 23usize;
24241    pub const DEFAULT: Self = Self {
24242        param_value: 0.0_f32,
24243        target_system: 0_u8,
24244        target_component: 0_u8,
24245        param_id: CharArray::new([0_u8; 16usize]),
24246        param_type: MavParamType::DEFAULT,
24247    };
24248    #[cfg(feature = "arbitrary")]
24249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24250        use arbitrary::{Arbitrary, Unstructured};
24251        let mut buf = [0u8; 1024];
24252        rng.fill_bytes(&mut buf);
24253        let mut unstructured = Unstructured::new(&buf);
24254        Self::arbitrary(&mut unstructured).unwrap_or_default()
24255    }
24256}
24257impl Default for PARAM_SET_DATA {
24258    fn default() -> Self {
24259        Self::DEFAULT.clone()
24260    }
24261}
24262impl MessageData for PARAM_SET_DATA {
24263    type Message = MavMessage;
24264    const ID: u32 = 23u32;
24265    const NAME: &'static str = "PARAM_SET";
24266    const EXTRA_CRC: u8 = 168u8;
24267    const ENCODED_LEN: usize = 23usize;
24268    fn deser(
24269        _version: MavlinkVersion,
24270        __input: &[u8],
24271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24272        let avail_len = __input.len();
24273        let mut payload_buf = [0; Self::ENCODED_LEN];
24274        let mut buf = if avail_len < Self::ENCODED_LEN {
24275            payload_buf[0..avail_len].copy_from_slice(__input);
24276            Bytes::new(&payload_buf)
24277        } else {
24278            Bytes::new(__input)
24279        };
24280        let mut __struct = Self::default();
24281        __struct.param_value = buf.get_f32_le()?;
24282        __struct.target_system = buf.get_u8()?;
24283        __struct.target_component = buf.get_u8()?;
24284        let mut tmp = [0_u8; 16usize];
24285        for v in &mut tmp {
24286            *v = buf.get_u8()?;
24287        }
24288        __struct.param_id = CharArray::new(tmp);
24289        let tmp = buf.get_u8()?;
24290        __struct.param_type =
24291            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24292                enum_type: "MavParamType",
24293                value: tmp as u64,
24294            })?;
24295        Ok(__struct)
24296    }
24297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24298        let mut __tmp = BytesMut::new(bytes);
24299        #[allow(clippy::absurd_extreme_comparisons)]
24300        #[allow(unused_comparisons)]
24301        if __tmp.remaining() < Self::ENCODED_LEN {
24302            panic!(
24303                "buffer is too small (need {} bytes, but got {})",
24304                Self::ENCODED_LEN,
24305                __tmp.remaining(),
24306            )
24307        }
24308        __tmp.put_f32_le(self.param_value);
24309        __tmp.put_u8(self.target_system);
24310        __tmp.put_u8(self.target_component);
24311        for val in &self.param_id {
24312            __tmp.put_u8(*val);
24313        }
24314        __tmp.put_u8(self.param_type as u8);
24315        if matches!(version, MavlinkVersion::V2) {
24316            let len = __tmp.len();
24317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24318        } else {
24319            __tmp.len()
24320        }
24321    }
24322}
24323#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24324#[doc = ""]
24325#[doc = "ID: 22"]
24326#[derive(Debug, Clone, PartialEq)]
24327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24329#[cfg_attr(feature = "ts", derive(TS))]
24330#[cfg_attr(feature = "ts", ts(export))]
24331pub struct PARAM_VALUE_DATA {
24332    #[doc = "Onboard parameter value"]
24333    pub param_value: f32,
24334    #[doc = "Total number of onboard parameters"]
24335    pub param_count: u16,
24336    #[doc = "Index of this onboard parameter"]
24337    pub param_index: u16,
24338    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24339    #[cfg_attr(feature = "ts", ts(type = "string"))]
24340    pub param_id: CharArray<16>,
24341    #[doc = "Onboard parameter type."]
24342    pub param_type: MavParamType,
24343}
24344impl PARAM_VALUE_DATA {
24345    pub const ENCODED_LEN: usize = 25usize;
24346    pub const DEFAULT: Self = Self {
24347        param_value: 0.0_f32,
24348        param_count: 0_u16,
24349        param_index: 0_u16,
24350        param_id: CharArray::new([0_u8; 16usize]),
24351        param_type: MavParamType::DEFAULT,
24352    };
24353    #[cfg(feature = "arbitrary")]
24354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24355        use arbitrary::{Arbitrary, Unstructured};
24356        let mut buf = [0u8; 1024];
24357        rng.fill_bytes(&mut buf);
24358        let mut unstructured = Unstructured::new(&buf);
24359        Self::arbitrary(&mut unstructured).unwrap_or_default()
24360    }
24361}
24362impl Default for PARAM_VALUE_DATA {
24363    fn default() -> Self {
24364        Self::DEFAULT.clone()
24365    }
24366}
24367impl MessageData for PARAM_VALUE_DATA {
24368    type Message = MavMessage;
24369    const ID: u32 = 22u32;
24370    const NAME: &'static str = "PARAM_VALUE";
24371    const EXTRA_CRC: u8 = 220u8;
24372    const ENCODED_LEN: usize = 25usize;
24373    fn deser(
24374        _version: MavlinkVersion,
24375        __input: &[u8],
24376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24377        let avail_len = __input.len();
24378        let mut payload_buf = [0; Self::ENCODED_LEN];
24379        let mut buf = if avail_len < Self::ENCODED_LEN {
24380            payload_buf[0..avail_len].copy_from_slice(__input);
24381            Bytes::new(&payload_buf)
24382        } else {
24383            Bytes::new(__input)
24384        };
24385        let mut __struct = Self::default();
24386        __struct.param_value = buf.get_f32_le()?;
24387        __struct.param_count = buf.get_u16_le()?;
24388        __struct.param_index = buf.get_u16_le()?;
24389        let mut tmp = [0_u8; 16usize];
24390        for v in &mut tmp {
24391            *v = buf.get_u8()?;
24392        }
24393        __struct.param_id = CharArray::new(tmp);
24394        let tmp = buf.get_u8()?;
24395        __struct.param_type =
24396            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24397                enum_type: "MavParamType",
24398                value: tmp as u64,
24399            })?;
24400        Ok(__struct)
24401    }
24402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24403        let mut __tmp = BytesMut::new(bytes);
24404        #[allow(clippy::absurd_extreme_comparisons)]
24405        #[allow(unused_comparisons)]
24406        if __tmp.remaining() < Self::ENCODED_LEN {
24407            panic!(
24408                "buffer is too small (need {} bytes, but got {})",
24409                Self::ENCODED_LEN,
24410                __tmp.remaining(),
24411            )
24412        }
24413        __tmp.put_f32_le(self.param_value);
24414        __tmp.put_u16_le(self.param_count);
24415        __tmp.put_u16_le(self.param_index);
24416        for val in &self.param_id {
24417            __tmp.put_u8(*val);
24418        }
24419        __tmp.put_u8(self.param_type as u8);
24420        if matches!(version, MavlinkVersion::V2) {
24421            let len = __tmp.len();
24422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24423        } else {
24424            __tmp.len()
24425        }
24426    }
24427}
24428#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24429#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24430#[doc = ""]
24431#[doc = "ID: 4"]
24432#[derive(Debug, Clone, PartialEq)]
24433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24435#[cfg_attr(feature = "ts", derive(TS))]
24436#[cfg_attr(feature = "ts", ts(export))]
24437pub struct PING_DATA {
24438    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24439    pub time_usec: u64,
24440    #[doc = "PING sequence"]
24441    pub seq: u32,
24442    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24443    pub target_system: u8,
24444    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24445    pub target_component: u8,
24446}
24447impl PING_DATA {
24448    pub const ENCODED_LEN: usize = 14usize;
24449    pub const DEFAULT: Self = Self {
24450        time_usec: 0_u64,
24451        seq: 0_u32,
24452        target_system: 0_u8,
24453        target_component: 0_u8,
24454    };
24455    #[cfg(feature = "arbitrary")]
24456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24457        use arbitrary::{Arbitrary, Unstructured};
24458        let mut buf = [0u8; 1024];
24459        rng.fill_bytes(&mut buf);
24460        let mut unstructured = Unstructured::new(&buf);
24461        Self::arbitrary(&mut unstructured).unwrap_or_default()
24462    }
24463}
24464impl Default for PING_DATA {
24465    fn default() -> Self {
24466        Self::DEFAULT.clone()
24467    }
24468}
24469impl MessageData for PING_DATA {
24470    type Message = MavMessage;
24471    const ID: u32 = 4u32;
24472    const NAME: &'static str = "PING";
24473    const EXTRA_CRC: u8 = 237u8;
24474    const ENCODED_LEN: usize = 14usize;
24475    fn deser(
24476        _version: MavlinkVersion,
24477        __input: &[u8],
24478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24479        let avail_len = __input.len();
24480        let mut payload_buf = [0; Self::ENCODED_LEN];
24481        let mut buf = if avail_len < Self::ENCODED_LEN {
24482            payload_buf[0..avail_len].copy_from_slice(__input);
24483            Bytes::new(&payload_buf)
24484        } else {
24485            Bytes::new(__input)
24486        };
24487        let mut __struct = Self::default();
24488        __struct.time_usec = buf.get_u64_le()?;
24489        __struct.seq = buf.get_u32_le()?;
24490        __struct.target_system = buf.get_u8()?;
24491        __struct.target_component = buf.get_u8()?;
24492        Ok(__struct)
24493    }
24494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24495        let mut __tmp = BytesMut::new(bytes);
24496        #[allow(clippy::absurd_extreme_comparisons)]
24497        #[allow(unused_comparisons)]
24498        if __tmp.remaining() < Self::ENCODED_LEN {
24499            panic!(
24500                "buffer is too small (need {} bytes, but got {})",
24501                Self::ENCODED_LEN,
24502                __tmp.remaining(),
24503            )
24504        }
24505        __tmp.put_u64_le(self.time_usec);
24506        __tmp.put_u32_le(self.seq);
24507        __tmp.put_u8(self.target_system);
24508        __tmp.put_u8(self.target_component);
24509        if matches!(version, MavlinkVersion::V2) {
24510            let len = __tmp.len();
24511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24512        } else {
24513            __tmp.len()
24514        }
24515    }
24516}
24517#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24518#[doc = "Control vehicle tone generation (buzzer)."]
24519#[doc = ""]
24520#[doc = "ID: 258"]
24521#[derive(Debug, Clone, PartialEq)]
24522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24524#[cfg_attr(feature = "ts", derive(TS))]
24525#[cfg_attr(feature = "ts", ts(export))]
24526pub struct PLAY_TUNE_DATA {
24527    #[doc = "System ID"]
24528    pub target_system: u8,
24529    #[doc = "Component ID"]
24530    pub target_component: u8,
24531    #[doc = "tune in board specific format"]
24532    #[cfg_attr(feature = "ts", ts(type = "string"))]
24533    pub tune: CharArray<30>,
24534    #[doc = "tune extension (appended to tune)"]
24535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24536    #[cfg_attr(feature = "ts", ts(type = "string"))]
24537    pub tune2: CharArray<200>,
24538}
24539impl PLAY_TUNE_DATA {
24540    pub const ENCODED_LEN: usize = 232usize;
24541    pub const DEFAULT: Self = Self {
24542        target_system: 0_u8,
24543        target_component: 0_u8,
24544        tune: CharArray::new([0_u8; 30usize]),
24545        tune2: CharArray::new([0_u8; 200usize]),
24546    };
24547    #[cfg(feature = "arbitrary")]
24548    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24549        use arbitrary::{Arbitrary, Unstructured};
24550        let mut buf = [0u8; 1024];
24551        rng.fill_bytes(&mut buf);
24552        let mut unstructured = Unstructured::new(&buf);
24553        Self::arbitrary(&mut unstructured).unwrap_or_default()
24554    }
24555}
24556impl Default for PLAY_TUNE_DATA {
24557    fn default() -> Self {
24558        Self::DEFAULT.clone()
24559    }
24560}
24561impl MessageData for PLAY_TUNE_DATA {
24562    type Message = MavMessage;
24563    const ID: u32 = 258u32;
24564    const NAME: &'static str = "PLAY_TUNE";
24565    const EXTRA_CRC: u8 = 187u8;
24566    const ENCODED_LEN: usize = 232usize;
24567    fn deser(
24568        _version: MavlinkVersion,
24569        __input: &[u8],
24570    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24571        let avail_len = __input.len();
24572        let mut payload_buf = [0; Self::ENCODED_LEN];
24573        let mut buf = if avail_len < Self::ENCODED_LEN {
24574            payload_buf[0..avail_len].copy_from_slice(__input);
24575            Bytes::new(&payload_buf)
24576        } else {
24577            Bytes::new(__input)
24578        };
24579        let mut __struct = Self::default();
24580        __struct.target_system = buf.get_u8()?;
24581        __struct.target_component = buf.get_u8()?;
24582        let mut tmp = [0_u8; 30usize];
24583        for v in &mut tmp {
24584            *v = buf.get_u8()?;
24585        }
24586        __struct.tune = CharArray::new(tmp);
24587        let mut tmp = [0_u8; 200usize];
24588        for v in &mut tmp {
24589            *v = buf.get_u8()?;
24590        }
24591        __struct.tune2 = CharArray::new(tmp);
24592        Ok(__struct)
24593    }
24594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24595        let mut __tmp = BytesMut::new(bytes);
24596        #[allow(clippy::absurd_extreme_comparisons)]
24597        #[allow(unused_comparisons)]
24598        if __tmp.remaining() < Self::ENCODED_LEN {
24599            panic!(
24600                "buffer is too small (need {} bytes, but got {})",
24601                Self::ENCODED_LEN,
24602                __tmp.remaining(),
24603            )
24604        }
24605        __tmp.put_u8(self.target_system);
24606        __tmp.put_u8(self.target_component);
24607        for val in &self.tune {
24608            __tmp.put_u8(*val);
24609        }
24610        if matches!(version, MavlinkVersion::V2) {
24611            for val in &self.tune2 {
24612                __tmp.put_u8(*val);
24613            }
24614            let len = __tmp.len();
24615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24616        } else {
24617            __tmp.len()
24618        }
24619    }
24620}
24621#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24622#[doc = ""]
24623#[doc = "ID: 400"]
24624#[derive(Debug, Clone, PartialEq)]
24625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24627#[cfg_attr(feature = "ts", derive(TS))]
24628#[cfg_attr(feature = "ts", ts(export))]
24629pub struct PLAY_TUNE_V2_DATA {
24630    #[doc = "Tune format"]
24631    pub format: TuneFormat,
24632    #[doc = "System ID"]
24633    pub target_system: u8,
24634    #[doc = "Component ID"]
24635    pub target_component: u8,
24636    #[doc = "Tune definition as a NULL-terminated string."]
24637    #[cfg_attr(feature = "ts", ts(type = "string"))]
24638    pub tune: CharArray<248>,
24639}
24640impl PLAY_TUNE_V2_DATA {
24641    pub const ENCODED_LEN: usize = 254usize;
24642    pub const DEFAULT: Self = Self {
24643        format: TuneFormat::DEFAULT,
24644        target_system: 0_u8,
24645        target_component: 0_u8,
24646        tune: CharArray::new([0_u8; 248usize]),
24647    };
24648    #[cfg(feature = "arbitrary")]
24649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24650        use arbitrary::{Arbitrary, Unstructured};
24651        let mut buf = [0u8; 1024];
24652        rng.fill_bytes(&mut buf);
24653        let mut unstructured = Unstructured::new(&buf);
24654        Self::arbitrary(&mut unstructured).unwrap_or_default()
24655    }
24656}
24657impl Default for PLAY_TUNE_V2_DATA {
24658    fn default() -> Self {
24659        Self::DEFAULT.clone()
24660    }
24661}
24662impl MessageData for PLAY_TUNE_V2_DATA {
24663    type Message = MavMessage;
24664    const ID: u32 = 400u32;
24665    const NAME: &'static str = "PLAY_TUNE_V2";
24666    const EXTRA_CRC: u8 = 110u8;
24667    const ENCODED_LEN: usize = 254usize;
24668    fn deser(
24669        _version: MavlinkVersion,
24670        __input: &[u8],
24671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24672        let avail_len = __input.len();
24673        let mut payload_buf = [0; Self::ENCODED_LEN];
24674        let mut buf = if avail_len < Self::ENCODED_LEN {
24675            payload_buf[0..avail_len].copy_from_slice(__input);
24676            Bytes::new(&payload_buf)
24677        } else {
24678            Bytes::new(__input)
24679        };
24680        let mut __struct = Self::default();
24681        let tmp = buf.get_u32_le()?;
24682        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24683            ::mavlink_core::error::ParserError::InvalidEnum {
24684                enum_type: "TuneFormat",
24685                value: tmp as u64,
24686            },
24687        )?;
24688        __struct.target_system = buf.get_u8()?;
24689        __struct.target_component = buf.get_u8()?;
24690        let mut tmp = [0_u8; 248usize];
24691        for v in &mut tmp {
24692            *v = buf.get_u8()?;
24693        }
24694        __struct.tune = CharArray::new(tmp);
24695        Ok(__struct)
24696    }
24697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24698        let mut __tmp = BytesMut::new(bytes);
24699        #[allow(clippy::absurd_extreme_comparisons)]
24700        #[allow(unused_comparisons)]
24701        if __tmp.remaining() < Self::ENCODED_LEN {
24702            panic!(
24703                "buffer is too small (need {} bytes, but got {})",
24704                Self::ENCODED_LEN,
24705                __tmp.remaining(),
24706            )
24707        }
24708        __tmp.put_u32_le(self.format as u32);
24709        __tmp.put_u8(self.target_system);
24710        __tmp.put_u8(self.target_component);
24711        for val in &self.tune {
24712            __tmp.put_u8(*val);
24713        }
24714        if matches!(version, MavlinkVersion::V2) {
24715            let len = __tmp.len();
24716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24717        } else {
24718            __tmp.len()
24719        }
24720    }
24721}
24722#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24723#[doc = ""]
24724#[doc = "ID: 87"]
24725#[derive(Debug, Clone, PartialEq)]
24726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24728#[cfg_attr(feature = "ts", derive(TS))]
24729#[cfg_attr(feature = "ts", ts(export))]
24730pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24731    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24732    pub time_boot_ms: u32,
24733    #[doc = "Latitude in WGS84 frame"]
24734    pub lat_int: i32,
24735    #[doc = "Longitude in WGS84 frame"]
24736    pub lon_int: i32,
24737    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24738    pub alt: f32,
24739    #[doc = "X velocity in NED frame"]
24740    pub vx: f32,
24741    #[doc = "Y velocity in NED frame"]
24742    pub vy: f32,
24743    #[doc = "Z velocity in NED frame"]
24744    pub vz: f32,
24745    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24746    pub afx: f32,
24747    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24748    pub afy: f32,
24749    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24750    pub afz: f32,
24751    #[doc = "yaw setpoint"]
24752    pub yaw: f32,
24753    #[doc = "yaw rate setpoint"]
24754    pub yaw_rate: f32,
24755    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24756    pub type_mask: PositionTargetTypemask,
24757    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24758    pub coordinate_frame: MavFrame,
24759}
24760impl POSITION_TARGET_GLOBAL_INT_DATA {
24761    pub const ENCODED_LEN: usize = 51usize;
24762    pub const DEFAULT: Self = Self {
24763        time_boot_ms: 0_u32,
24764        lat_int: 0_i32,
24765        lon_int: 0_i32,
24766        alt: 0.0_f32,
24767        vx: 0.0_f32,
24768        vy: 0.0_f32,
24769        vz: 0.0_f32,
24770        afx: 0.0_f32,
24771        afy: 0.0_f32,
24772        afz: 0.0_f32,
24773        yaw: 0.0_f32,
24774        yaw_rate: 0.0_f32,
24775        type_mask: PositionTargetTypemask::DEFAULT,
24776        coordinate_frame: MavFrame::DEFAULT,
24777    };
24778    #[cfg(feature = "arbitrary")]
24779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24780        use arbitrary::{Arbitrary, Unstructured};
24781        let mut buf = [0u8; 1024];
24782        rng.fill_bytes(&mut buf);
24783        let mut unstructured = Unstructured::new(&buf);
24784        Self::arbitrary(&mut unstructured).unwrap_or_default()
24785    }
24786}
24787impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24788    fn default() -> Self {
24789        Self::DEFAULT.clone()
24790    }
24791}
24792impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24793    type Message = MavMessage;
24794    const ID: u32 = 87u32;
24795    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24796    const EXTRA_CRC: u8 = 150u8;
24797    const ENCODED_LEN: usize = 51usize;
24798    fn deser(
24799        _version: MavlinkVersion,
24800        __input: &[u8],
24801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24802        let avail_len = __input.len();
24803        let mut payload_buf = [0; Self::ENCODED_LEN];
24804        let mut buf = if avail_len < Self::ENCODED_LEN {
24805            payload_buf[0..avail_len].copy_from_slice(__input);
24806            Bytes::new(&payload_buf)
24807        } else {
24808            Bytes::new(__input)
24809        };
24810        let mut __struct = Self::default();
24811        __struct.time_boot_ms = buf.get_u32_le()?;
24812        __struct.lat_int = buf.get_i32_le()?;
24813        __struct.lon_int = buf.get_i32_le()?;
24814        __struct.alt = buf.get_f32_le()?;
24815        __struct.vx = buf.get_f32_le()?;
24816        __struct.vy = buf.get_f32_le()?;
24817        __struct.vz = buf.get_f32_le()?;
24818        __struct.afx = buf.get_f32_le()?;
24819        __struct.afy = buf.get_f32_le()?;
24820        __struct.afz = buf.get_f32_le()?;
24821        __struct.yaw = buf.get_f32_le()?;
24822        __struct.yaw_rate = buf.get_f32_le()?;
24823        let tmp = buf.get_u16_le()?;
24824        __struct.type_mask =
24825            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24826                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24827                    flag_type: "PositionTargetTypemask",
24828                    value: tmp as u64,
24829                })?;
24830        let tmp = buf.get_u8()?;
24831        __struct.coordinate_frame =
24832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24833                enum_type: "MavFrame",
24834                value: tmp as u64,
24835            })?;
24836        Ok(__struct)
24837    }
24838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24839        let mut __tmp = BytesMut::new(bytes);
24840        #[allow(clippy::absurd_extreme_comparisons)]
24841        #[allow(unused_comparisons)]
24842        if __tmp.remaining() < Self::ENCODED_LEN {
24843            panic!(
24844                "buffer is too small (need {} bytes, but got {})",
24845                Self::ENCODED_LEN,
24846                __tmp.remaining(),
24847            )
24848        }
24849        __tmp.put_u32_le(self.time_boot_ms);
24850        __tmp.put_i32_le(self.lat_int);
24851        __tmp.put_i32_le(self.lon_int);
24852        __tmp.put_f32_le(self.alt);
24853        __tmp.put_f32_le(self.vx);
24854        __tmp.put_f32_le(self.vy);
24855        __tmp.put_f32_le(self.vz);
24856        __tmp.put_f32_le(self.afx);
24857        __tmp.put_f32_le(self.afy);
24858        __tmp.put_f32_le(self.afz);
24859        __tmp.put_f32_le(self.yaw);
24860        __tmp.put_f32_le(self.yaw_rate);
24861        __tmp.put_u16_le(self.type_mask.bits() as u16);
24862        __tmp.put_u8(self.coordinate_frame as u8);
24863        if matches!(version, MavlinkVersion::V2) {
24864            let len = __tmp.len();
24865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24866        } else {
24867            __tmp.len()
24868        }
24869    }
24870}
24871#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24872#[doc = ""]
24873#[doc = "ID: 85"]
24874#[derive(Debug, Clone, PartialEq)]
24875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24877#[cfg_attr(feature = "ts", derive(TS))]
24878#[cfg_attr(feature = "ts", ts(export))]
24879pub struct POSITION_TARGET_LOCAL_NED_DATA {
24880    #[doc = "Timestamp (time since system boot)."]
24881    pub time_boot_ms: u32,
24882    #[doc = "X Position in NED frame"]
24883    pub x: f32,
24884    #[doc = "Y Position in NED frame"]
24885    pub y: f32,
24886    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24887    pub z: f32,
24888    #[doc = "X velocity in NED frame"]
24889    pub vx: f32,
24890    #[doc = "Y velocity in NED frame"]
24891    pub vy: f32,
24892    #[doc = "Z velocity in NED frame"]
24893    pub vz: f32,
24894    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24895    pub afx: f32,
24896    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24897    pub afy: f32,
24898    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24899    pub afz: f32,
24900    #[doc = "yaw setpoint"]
24901    pub yaw: f32,
24902    #[doc = "yaw rate setpoint"]
24903    pub yaw_rate: f32,
24904    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24905    pub type_mask: PositionTargetTypemask,
24906    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24907    pub coordinate_frame: MavFrame,
24908}
24909impl POSITION_TARGET_LOCAL_NED_DATA {
24910    pub const ENCODED_LEN: usize = 51usize;
24911    pub const DEFAULT: Self = Self {
24912        time_boot_ms: 0_u32,
24913        x: 0.0_f32,
24914        y: 0.0_f32,
24915        z: 0.0_f32,
24916        vx: 0.0_f32,
24917        vy: 0.0_f32,
24918        vz: 0.0_f32,
24919        afx: 0.0_f32,
24920        afy: 0.0_f32,
24921        afz: 0.0_f32,
24922        yaw: 0.0_f32,
24923        yaw_rate: 0.0_f32,
24924        type_mask: PositionTargetTypemask::DEFAULT,
24925        coordinate_frame: MavFrame::DEFAULT,
24926    };
24927    #[cfg(feature = "arbitrary")]
24928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24929        use arbitrary::{Arbitrary, Unstructured};
24930        let mut buf = [0u8; 1024];
24931        rng.fill_bytes(&mut buf);
24932        let mut unstructured = Unstructured::new(&buf);
24933        Self::arbitrary(&mut unstructured).unwrap_or_default()
24934    }
24935}
24936impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24937    fn default() -> Self {
24938        Self::DEFAULT.clone()
24939    }
24940}
24941impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24942    type Message = MavMessage;
24943    const ID: u32 = 85u32;
24944    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24945    const EXTRA_CRC: u8 = 140u8;
24946    const ENCODED_LEN: usize = 51usize;
24947    fn deser(
24948        _version: MavlinkVersion,
24949        __input: &[u8],
24950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24951        let avail_len = __input.len();
24952        let mut payload_buf = [0; Self::ENCODED_LEN];
24953        let mut buf = if avail_len < Self::ENCODED_LEN {
24954            payload_buf[0..avail_len].copy_from_slice(__input);
24955            Bytes::new(&payload_buf)
24956        } else {
24957            Bytes::new(__input)
24958        };
24959        let mut __struct = Self::default();
24960        __struct.time_boot_ms = buf.get_u32_le()?;
24961        __struct.x = buf.get_f32_le()?;
24962        __struct.y = buf.get_f32_le()?;
24963        __struct.z = buf.get_f32_le()?;
24964        __struct.vx = buf.get_f32_le()?;
24965        __struct.vy = buf.get_f32_le()?;
24966        __struct.vz = buf.get_f32_le()?;
24967        __struct.afx = buf.get_f32_le()?;
24968        __struct.afy = buf.get_f32_le()?;
24969        __struct.afz = buf.get_f32_le()?;
24970        __struct.yaw = buf.get_f32_le()?;
24971        __struct.yaw_rate = buf.get_f32_le()?;
24972        let tmp = buf.get_u16_le()?;
24973        __struct.type_mask =
24974            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24975                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24976                    flag_type: "PositionTargetTypemask",
24977                    value: tmp as u64,
24978                })?;
24979        let tmp = buf.get_u8()?;
24980        __struct.coordinate_frame =
24981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24982                enum_type: "MavFrame",
24983                value: tmp as u64,
24984            })?;
24985        Ok(__struct)
24986    }
24987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24988        let mut __tmp = BytesMut::new(bytes);
24989        #[allow(clippy::absurd_extreme_comparisons)]
24990        #[allow(unused_comparisons)]
24991        if __tmp.remaining() < Self::ENCODED_LEN {
24992            panic!(
24993                "buffer is too small (need {} bytes, but got {})",
24994                Self::ENCODED_LEN,
24995                __tmp.remaining(),
24996            )
24997        }
24998        __tmp.put_u32_le(self.time_boot_ms);
24999        __tmp.put_f32_le(self.x);
25000        __tmp.put_f32_le(self.y);
25001        __tmp.put_f32_le(self.z);
25002        __tmp.put_f32_le(self.vx);
25003        __tmp.put_f32_le(self.vy);
25004        __tmp.put_f32_le(self.vz);
25005        __tmp.put_f32_le(self.afx);
25006        __tmp.put_f32_le(self.afy);
25007        __tmp.put_f32_le(self.afz);
25008        __tmp.put_f32_le(self.yaw);
25009        __tmp.put_f32_le(self.yaw_rate);
25010        __tmp.put_u16_le(self.type_mask.bits() as u16);
25011        __tmp.put_u8(self.coordinate_frame as u8);
25012        if matches!(version, MavlinkVersion::V2) {
25013            let len = __tmp.len();
25014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25015        } else {
25016            __tmp.len()
25017        }
25018    }
25019}
25020#[doc = "Power supply status."]
25021#[doc = ""]
25022#[doc = "ID: 125"]
25023#[derive(Debug, Clone, PartialEq)]
25024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25026#[cfg_attr(feature = "ts", derive(TS))]
25027#[cfg_attr(feature = "ts", ts(export))]
25028pub struct POWER_STATUS_DATA {
25029    #[doc = "5V rail voltage."]
25030    pub Vcc: u16,
25031    #[doc = "Servo rail voltage."]
25032    pub Vservo: u16,
25033    #[doc = "Bitmap of power supply status flags."]
25034    pub flags: MavPowerStatus,
25035}
25036impl POWER_STATUS_DATA {
25037    pub const ENCODED_LEN: usize = 6usize;
25038    pub const DEFAULT: Self = Self {
25039        Vcc: 0_u16,
25040        Vservo: 0_u16,
25041        flags: MavPowerStatus::DEFAULT,
25042    };
25043    #[cfg(feature = "arbitrary")]
25044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25045        use arbitrary::{Arbitrary, Unstructured};
25046        let mut buf = [0u8; 1024];
25047        rng.fill_bytes(&mut buf);
25048        let mut unstructured = Unstructured::new(&buf);
25049        Self::arbitrary(&mut unstructured).unwrap_or_default()
25050    }
25051}
25052impl Default for POWER_STATUS_DATA {
25053    fn default() -> Self {
25054        Self::DEFAULT.clone()
25055    }
25056}
25057impl MessageData for POWER_STATUS_DATA {
25058    type Message = MavMessage;
25059    const ID: u32 = 125u32;
25060    const NAME: &'static str = "POWER_STATUS";
25061    const EXTRA_CRC: u8 = 203u8;
25062    const ENCODED_LEN: usize = 6usize;
25063    fn deser(
25064        _version: MavlinkVersion,
25065        __input: &[u8],
25066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25067        let avail_len = __input.len();
25068        let mut payload_buf = [0; Self::ENCODED_LEN];
25069        let mut buf = if avail_len < Self::ENCODED_LEN {
25070            payload_buf[0..avail_len].copy_from_slice(__input);
25071            Bytes::new(&payload_buf)
25072        } else {
25073            Bytes::new(__input)
25074        };
25075        let mut __struct = Self::default();
25076        __struct.Vcc = buf.get_u16_le()?;
25077        __struct.Vservo = buf.get_u16_le()?;
25078        let tmp = buf.get_u16_le()?;
25079        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25080            ::mavlink_core::error::ParserError::InvalidFlag {
25081                flag_type: "MavPowerStatus",
25082                value: tmp as u64,
25083            },
25084        )?;
25085        Ok(__struct)
25086    }
25087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25088        let mut __tmp = BytesMut::new(bytes);
25089        #[allow(clippy::absurd_extreme_comparisons)]
25090        #[allow(unused_comparisons)]
25091        if __tmp.remaining() < Self::ENCODED_LEN {
25092            panic!(
25093                "buffer is too small (need {} bytes, but got {})",
25094                Self::ENCODED_LEN,
25095                __tmp.remaining(),
25096            )
25097        }
25098        __tmp.put_u16_le(self.Vcc);
25099        __tmp.put_u16_le(self.Vservo);
25100        __tmp.put_u16_le(self.flags.bits() as u16);
25101        if matches!(version, MavlinkVersion::V2) {
25102            let len = __tmp.len();
25103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25104        } else {
25105            __tmp.len()
25106        }
25107    }
25108}
25109#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25110#[doc = ""]
25111#[doc = "ID: 300"]
25112#[derive(Debug, Clone, PartialEq)]
25113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25115#[cfg_attr(feature = "ts", derive(TS))]
25116#[cfg_attr(feature = "ts", ts(export))]
25117pub struct PROTOCOL_VERSION_DATA {
25118    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25119    pub version: u16,
25120    #[doc = "Minimum MAVLink version supported"]
25121    pub min_version: u16,
25122    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25123    pub max_version: u16,
25124    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25127    pub spec_version_hash: [u8; 8],
25128    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25131    pub library_version_hash: [u8; 8],
25132}
25133impl PROTOCOL_VERSION_DATA {
25134    pub const ENCODED_LEN: usize = 22usize;
25135    pub const DEFAULT: Self = Self {
25136        version: 0_u16,
25137        min_version: 0_u16,
25138        max_version: 0_u16,
25139        spec_version_hash: [0_u8; 8usize],
25140        library_version_hash: [0_u8; 8usize],
25141    };
25142    #[cfg(feature = "arbitrary")]
25143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25144        use arbitrary::{Arbitrary, Unstructured};
25145        let mut buf = [0u8; 1024];
25146        rng.fill_bytes(&mut buf);
25147        let mut unstructured = Unstructured::new(&buf);
25148        Self::arbitrary(&mut unstructured).unwrap_or_default()
25149    }
25150}
25151impl Default for PROTOCOL_VERSION_DATA {
25152    fn default() -> Self {
25153        Self::DEFAULT.clone()
25154    }
25155}
25156impl MessageData for PROTOCOL_VERSION_DATA {
25157    type Message = MavMessage;
25158    const ID: u32 = 300u32;
25159    const NAME: &'static str = "PROTOCOL_VERSION";
25160    const EXTRA_CRC: u8 = 217u8;
25161    const ENCODED_LEN: usize = 22usize;
25162    fn deser(
25163        _version: MavlinkVersion,
25164        __input: &[u8],
25165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25166        let avail_len = __input.len();
25167        let mut payload_buf = [0; Self::ENCODED_LEN];
25168        let mut buf = if avail_len < Self::ENCODED_LEN {
25169            payload_buf[0..avail_len].copy_from_slice(__input);
25170            Bytes::new(&payload_buf)
25171        } else {
25172            Bytes::new(__input)
25173        };
25174        let mut __struct = Self::default();
25175        __struct.version = buf.get_u16_le()?;
25176        __struct.min_version = buf.get_u16_le()?;
25177        __struct.max_version = buf.get_u16_le()?;
25178        for v in &mut __struct.spec_version_hash {
25179            let val = buf.get_u8()?;
25180            *v = val;
25181        }
25182        for v in &mut __struct.library_version_hash {
25183            let val = buf.get_u8()?;
25184            *v = val;
25185        }
25186        Ok(__struct)
25187    }
25188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25189        let mut __tmp = BytesMut::new(bytes);
25190        #[allow(clippy::absurd_extreme_comparisons)]
25191        #[allow(unused_comparisons)]
25192        if __tmp.remaining() < Self::ENCODED_LEN {
25193            panic!(
25194                "buffer is too small (need {} bytes, but got {})",
25195                Self::ENCODED_LEN,
25196                __tmp.remaining(),
25197            )
25198        }
25199        __tmp.put_u16_le(self.version);
25200        __tmp.put_u16_le(self.min_version);
25201        __tmp.put_u16_le(self.max_version);
25202        for val in &self.spec_version_hash {
25203            __tmp.put_u8(*val);
25204        }
25205        for val in &self.library_version_hash {
25206            __tmp.put_u8(*val);
25207        }
25208        if matches!(version, MavlinkVersion::V2) {
25209            let len = __tmp.len();
25210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25211        } else {
25212            __tmp.len()
25213        }
25214    }
25215}
25216#[doc = "Status generated by radio and injected into MAVLink stream."]
25217#[doc = ""]
25218#[doc = "ID: 109"]
25219#[derive(Debug, Clone, PartialEq)]
25220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25222#[cfg_attr(feature = "ts", derive(TS))]
25223#[cfg_attr(feature = "ts", ts(export))]
25224pub struct RADIO_STATUS_DATA {
25225    #[doc = "Count of radio packet receive errors (since boot)."]
25226    pub rxerrors: u16,
25227    #[doc = "Count of error corrected radio packets (since boot)."]
25228    pub fixed: u16,
25229    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25230    pub rssi: u8,
25231    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25232    pub remrssi: u8,
25233    #[doc = "Remaining free transmitter buffer space."]
25234    pub txbuf: u8,
25235    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25236    pub noise: u8,
25237    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25238    pub remnoise: u8,
25239}
25240impl RADIO_STATUS_DATA {
25241    pub const ENCODED_LEN: usize = 9usize;
25242    pub const DEFAULT: Self = Self {
25243        rxerrors: 0_u16,
25244        fixed: 0_u16,
25245        rssi: 0_u8,
25246        remrssi: 0_u8,
25247        txbuf: 0_u8,
25248        noise: 0_u8,
25249        remnoise: 0_u8,
25250    };
25251    #[cfg(feature = "arbitrary")]
25252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25253        use arbitrary::{Arbitrary, Unstructured};
25254        let mut buf = [0u8; 1024];
25255        rng.fill_bytes(&mut buf);
25256        let mut unstructured = Unstructured::new(&buf);
25257        Self::arbitrary(&mut unstructured).unwrap_or_default()
25258    }
25259}
25260impl Default for RADIO_STATUS_DATA {
25261    fn default() -> Self {
25262        Self::DEFAULT.clone()
25263    }
25264}
25265impl MessageData for RADIO_STATUS_DATA {
25266    type Message = MavMessage;
25267    const ID: u32 = 109u32;
25268    const NAME: &'static str = "RADIO_STATUS";
25269    const EXTRA_CRC: u8 = 185u8;
25270    const ENCODED_LEN: usize = 9usize;
25271    fn deser(
25272        _version: MavlinkVersion,
25273        __input: &[u8],
25274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25275        let avail_len = __input.len();
25276        let mut payload_buf = [0; Self::ENCODED_LEN];
25277        let mut buf = if avail_len < Self::ENCODED_LEN {
25278            payload_buf[0..avail_len].copy_from_slice(__input);
25279            Bytes::new(&payload_buf)
25280        } else {
25281            Bytes::new(__input)
25282        };
25283        let mut __struct = Self::default();
25284        __struct.rxerrors = buf.get_u16_le()?;
25285        __struct.fixed = buf.get_u16_le()?;
25286        __struct.rssi = buf.get_u8()?;
25287        __struct.remrssi = buf.get_u8()?;
25288        __struct.txbuf = buf.get_u8()?;
25289        __struct.noise = buf.get_u8()?;
25290        __struct.remnoise = buf.get_u8()?;
25291        Ok(__struct)
25292    }
25293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25294        let mut __tmp = BytesMut::new(bytes);
25295        #[allow(clippy::absurd_extreme_comparisons)]
25296        #[allow(unused_comparisons)]
25297        if __tmp.remaining() < Self::ENCODED_LEN {
25298            panic!(
25299                "buffer is too small (need {} bytes, but got {})",
25300                Self::ENCODED_LEN,
25301                __tmp.remaining(),
25302            )
25303        }
25304        __tmp.put_u16_le(self.rxerrors);
25305        __tmp.put_u16_le(self.fixed);
25306        __tmp.put_u8(self.rssi);
25307        __tmp.put_u8(self.remrssi);
25308        __tmp.put_u8(self.txbuf);
25309        __tmp.put_u8(self.noise);
25310        __tmp.put_u8(self.remnoise);
25311        if matches!(version, MavlinkVersion::V2) {
25312            let len = __tmp.len();
25313            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25314        } else {
25315            __tmp.len()
25316        }
25317    }
25318}
25319#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25320#[doc = ""]
25321#[doc = "ID: 27"]
25322#[derive(Debug, Clone, PartialEq)]
25323#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25325#[cfg_attr(feature = "ts", derive(TS))]
25326#[cfg_attr(feature = "ts", ts(export))]
25327pub struct RAW_IMU_DATA {
25328    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25329    pub time_usec: u64,
25330    #[doc = "X acceleration (raw)"]
25331    pub xacc: i16,
25332    #[doc = "Y acceleration (raw)"]
25333    pub yacc: i16,
25334    #[doc = "Z acceleration (raw)"]
25335    pub zacc: i16,
25336    #[doc = "Angular speed around X axis (raw)"]
25337    pub xgyro: i16,
25338    #[doc = "Angular speed around Y axis (raw)"]
25339    pub ygyro: i16,
25340    #[doc = "Angular speed around Z axis (raw)"]
25341    pub zgyro: i16,
25342    #[doc = "X Magnetic field (raw)"]
25343    pub xmag: i16,
25344    #[doc = "Y Magnetic field (raw)"]
25345    pub ymag: i16,
25346    #[doc = "Z Magnetic field (raw)"]
25347    pub zmag: i16,
25348    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25350    pub id: u8,
25351    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25353    pub temperature: i16,
25354}
25355impl RAW_IMU_DATA {
25356    pub const ENCODED_LEN: usize = 29usize;
25357    pub const DEFAULT: Self = Self {
25358        time_usec: 0_u64,
25359        xacc: 0_i16,
25360        yacc: 0_i16,
25361        zacc: 0_i16,
25362        xgyro: 0_i16,
25363        ygyro: 0_i16,
25364        zgyro: 0_i16,
25365        xmag: 0_i16,
25366        ymag: 0_i16,
25367        zmag: 0_i16,
25368        id: 0_u8,
25369        temperature: 0_i16,
25370    };
25371    #[cfg(feature = "arbitrary")]
25372    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25373        use arbitrary::{Arbitrary, Unstructured};
25374        let mut buf = [0u8; 1024];
25375        rng.fill_bytes(&mut buf);
25376        let mut unstructured = Unstructured::new(&buf);
25377        Self::arbitrary(&mut unstructured).unwrap_or_default()
25378    }
25379}
25380impl Default for RAW_IMU_DATA {
25381    fn default() -> Self {
25382        Self::DEFAULT.clone()
25383    }
25384}
25385impl MessageData for RAW_IMU_DATA {
25386    type Message = MavMessage;
25387    const ID: u32 = 27u32;
25388    const NAME: &'static str = "RAW_IMU";
25389    const EXTRA_CRC: u8 = 144u8;
25390    const ENCODED_LEN: usize = 29usize;
25391    fn deser(
25392        _version: MavlinkVersion,
25393        __input: &[u8],
25394    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25395        let avail_len = __input.len();
25396        let mut payload_buf = [0; Self::ENCODED_LEN];
25397        let mut buf = if avail_len < Self::ENCODED_LEN {
25398            payload_buf[0..avail_len].copy_from_slice(__input);
25399            Bytes::new(&payload_buf)
25400        } else {
25401            Bytes::new(__input)
25402        };
25403        let mut __struct = Self::default();
25404        __struct.time_usec = buf.get_u64_le()?;
25405        __struct.xacc = buf.get_i16_le()?;
25406        __struct.yacc = buf.get_i16_le()?;
25407        __struct.zacc = buf.get_i16_le()?;
25408        __struct.xgyro = buf.get_i16_le()?;
25409        __struct.ygyro = buf.get_i16_le()?;
25410        __struct.zgyro = buf.get_i16_le()?;
25411        __struct.xmag = buf.get_i16_le()?;
25412        __struct.ymag = buf.get_i16_le()?;
25413        __struct.zmag = buf.get_i16_le()?;
25414        __struct.id = buf.get_u8()?;
25415        __struct.temperature = buf.get_i16_le()?;
25416        Ok(__struct)
25417    }
25418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25419        let mut __tmp = BytesMut::new(bytes);
25420        #[allow(clippy::absurd_extreme_comparisons)]
25421        #[allow(unused_comparisons)]
25422        if __tmp.remaining() < Self::ENCODED_LEN {
25423            panic!(
25424                "buffer is too small (need {} bytes, but got {})",
25425                Self::ENCODED_LEN,
25426                __tmp.remaining(),
25427            )
25428        }
25429        __tmp.put_u64_le(self.time_usec);
25430        __tmp.put_i16_le(self.xacc);
25431        __tmp.put_i16_le(self.yacc);
25432        __tmp.put_i16_le(self.zacc);
25433        __tmp.put_i16_le(self.xgyro);
25434        __tmp.put_i16_le(self.ygyro);
25435        __tmp.put_i16_le(self.zgyro);
25436        __tmp.put_i16_le(self.xmag);
25437        __tmp.put_i16_le(self.ymag);
25438        __tmp.put_i16_le(self.zmag);
25439        if matches!(version, MavlinkVersion::V2) {
25440            __tmp.put_u8(self.id);
25441            __tmp.put_i16_le(self.temperature);
25442            let len = __tmp.len();
25443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25444        } else {
25445            __tmp.len()
25446        }
25447    }
25448}
25449#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25450#[doc = ""]
25451#[doc = "ID: 28"]
25452#[derive(Debug, Clone, PartialEq)]
25453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25455#[cfg_attr(feature = "ts", derive(TS))]
25456#[cfg_attr(feature = "ts", ts(export))]
25457pub struct RAW_PRESSURE_DATA {
25458    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25459    pub time_usec: u64,
25460    #[doc = "Absolute pressure (raw)"]
25461    pub press_abs: i16,
25462    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25463    pub press_diff1: i16,
25464    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25465    pub press_diff2: i16,
25466    #[doc = "Raw Temperature measurement (raw)"]
25467    pub temperature: i16,
25468}
25469impl RAW_PRESSURE_DATA {
25470    pub const ENCODED_LEN: usize = 16usize;
25471    pub const DEFAULT: Self = Self {
25472        time_usec: 0_u64,
25473        press_abs: 0_i16,
25474        press_diff1: 0_i16,
25475        press_diff2: 0_i16,
25476        temperature: 0_i16,
25477    };
25478    #[cfg(feature = "arbitrary")]
25479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25480        use arbitrary::{Arbitrary, Unstructured};
25481        let mut buf = [0u8; 1024];
25482        rng.fill_bytes(&mut buf);
25483        let mut unstructured = Unstructured::new(&buf);
25484        Self::arbitrary(&mut unstructured).unwrap_or_default()
25485    }
25486}
25487impl Default for RAW_PRESSURE_DATA {
25488    fn default() -> Self {
25489        Self::DEFAULT.clone()
25490    }
25491}
25492impl MessageData for RAW_PRESSURE_DATA {
25493    type Message = MavMessage;
25494    const ID: u32 = 28u32;
25495    const NAME: &'static str = "RAW_PRESSURE";
25496    const EXTRA_CRC: u8 = 67u8;
25497    const ENCODED_LEN: usize = 16usize;
25498    fn deser(
25499        _version: MavlinkVersion,
25500        __input: &[u8],
25501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25502        let avail_len = __input.len();
25503        let mut payload_buf = [0; Self::ENCODED_LEN];
25504        let mut buf = if avail_len < Self::ENCODED_LEN {
25505            payload_buf[0..avail_len].copy_from_slice(__input);
25506            Bytes::new(&payload_buf)
25507        } else {
25508            Bytes::new(__input)
25509        };
25510        let mut __struct = Self::default();
25511        __struct.time_usec = buf.get_u64_le()?;
25512        __struct.press_abs = buf.get_i16_le()?;
25513        __struct.press_diff1 = buf.get_i16_le()?;
25514        __struct.press_diff2 = buf.get_i16_le()?;
25515        __struct.temperature = buf.get_i16_le()?;
25516        Ok(__struct)
25517    }
25518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25519        let mut __tmp = BytesMut::new(bytes);
25520        #[allow(clippy::absurd_extreme_comparisons)]
25521        #[allow(unused_comparisons)]
25522        if __tmp.remaining() < Self::ENCODED_LEN {
25523            panic!(
25524                "buffer is too small (need {} bytes, but got {})",
25525                Self::ENCODED_LEN,
25526                __tmp.remaining(),
25527            )
25528        }
25529        __tmp.put_u64_le(self.time_usec);
25530        __tmp.put_i16_le(self.press_abs);
25531        __tmp.put_i16_le(self.press_diff1);
25532        __tmp.put_i16_le(self.press_diff2);
25533        __tmp.put_i16_le(self.temperature);
25534        if matches!(version, MavlinkVersion::V2) {
25535            let len = __tmp.len();
25536            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25537        } else {
25538            __tmp.len()
25539        }
25540    }
25541}
25542#[doc = "RPM sensor data message."]
25543#[doc = ""]
25544#[doc = "ID: 339"]
25545#[derive(Debug, Clone, PartialEq)]
25546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25548#[cfg_attr(feature = "ts", derive(TS))]
25549#[cfg_attr(feature = "ts", ts(export))]
25550pub struct RAW_RPM_DATA {
25551    #[doc = "Indicated rate"]
25552    pub frequency: f32,
25553    #[doc = "Index of this RPM sensor (0-indexed)"]
25554    pub index: u8,
25555}
25556impl RAW_RPM_DATA {
25557    pub const ENCODED_LEN: usize = 5usize;
25558    pub const DEFAULT: Self = Self {
25559        frequency: 0.0_f32,
25560        index: 0_u8,
25561    };
25562    #[cfg(feature = "arbitrary")]
25563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25564        use arbitrary::{Arbitrary, Unstructured};
25565        let mut buf = [0u8; 1024];
25566        rng.fill_bytes(&mut buf);
25567        let mut unstructured = Unstructured::new(&buf);
25568        Self::arbitrary(&mut unstructured).unwrap_or_default()
25569    }
25570}
25571impl Default for RAW_RPM_DATA {
25572    fn default() -> Self {
25573        Self::DEFAULT.clone()
25574    }
25575}
25576impl MessageData for RAW_RPM_DATA {
25577    type Message = MavMessage;
25578    const ID: u32 = 339u32;
25579    const NAME: &'static str = "RAW_RPM";
25580    const EXTRA_CRC: u8 = 199u8;
25581    const ENCODED_LEN: usize = 5usize;
25582    fn deser(
25583        _version: MavlinkVersion,
25584        __input: &[u8],
25585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25586        let avail_len = __input.len();
25587        let mut payload_buf = [0; Self::ENCODED_LEN];
25588        let mut buf = if avail_len < Self::ENCODED_LEN {
25589            payload_buf[0..avail_len].copy_from_slice(__input);
25590            Bytes::new(&payload_buf)
25591        } else {
25592            Bytes::new(__input)
25593        };
25594        let mut __struct = Self::default();
25595        __struct.frequency = buf.get_f32_le()?;
25596        __struct.index = buf.get_u8()?;
25597        Ok(__struct)
25598    }
25599    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25600        let mut __tmp = BytesMut::new(bytes);
25601        #[allow(clippy::absurd_extreme_comparisons)]
25602        #[allow(unused_comparisons)]
25603        if __tmp.remaining() < Self::ENCODED_LEN {
25604            panic!(
25605                "buffer is too small (need {} bytes, but got {})",
25606                Self::ENCODED_LEN,
25607                __tmp.remaining(),
25608            )
25609        }
25610        __tmp.put_f32_le(self.frequency);
25611        __tmp.put_u8(self.index);
25612        if matches!(version, MavlinkVersion::V2) {
25613            let len = __tmp.len();
25614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25615        } else {
25616            __tmp.len()
25617        }
25618    }
25619}
25620#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25621#[doc = ""]
25622#[doc = "ID: 65"]
25623#[derive(Debug, Clone, PartialEq)]
25624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25626#[cfg_attr(feature = "ts", derive(TS))]
25627#[cfg_attr(feature = "ts", ts(export))]
25628pub struct RC_CHANNELS_DATA {
25629    #[doc = "Timestamp (time since system boot)."]
25630    pub time_boot_ms: u32,
25631    #[doc = "RC channel 1 value."]
25632    pub chan1_raw: u16,
25633    #[doc = "RC channel 2 value."]
25634    pub chan2_raw: u16,
25635    #[doc = "RC channel 3 value."]
25636    pub chan3_raw: u16,
25637    #[doc = "RC channel 4 value."]
25638    pub chan4_raw: u16,
25639    #[doc = "RC channel 5 value."]
25640    pub chan5_raw: u16,
25641    #[doc = "RC channel 6 value."]
25642    pub chan6_raw: u16,
25643    #[doc = "RC channel 7 value."]
25644    pub chan7_raw: u16,
25645    #[doc = "RC channel 8 value."]
25646    pub chan8_raw: u16,
25647    #[doc = "RC channel 9 value."]
25648    pub chan9_raw: u16,
25649    #[doc = "RC channel 10 value."]
25650    pub chan10_raw: u16,
25651    #[doc = "RC channel 11 value."]
25652    pub chan11_raw: u16,
25653    #[doc = "RC channel 12 value."]
25654    pub chan12_raw: u16,
25655    #[doc = "RC channel 13 value."]
25656    pub chan13_raw: u16,
25657    #[doc = "RC channel 14 value."]
25658    pub chan14_raw: u16,
25659    #[doc = "RC channel 15 value."]
25660    pub chan15_raw: u16,
25661    #[doc = "RC channel 16 value."]
25662    pub chan16_raw: u16,
25663    #[doc = "RC channel 17 value."]
25664    pub chan17_raw: u16,
25665    #[doc = "RC channel 18 value."]
25666    pub chan18_raw: u16,
25667    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25668    pub chancount: u8,
25669    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25670    pub rssi: u8,
25671}
25672impl RC_CHANNELS_DATA {
25673    pub const ENCODED_LEN: usize = 42usize;
25674    pub const DEFAULT: Self = Self {
25675        time_boot_ms: 0_u32,
25676        chan1_raw: 0_u16,
25677        chan2_raw: 0_u16,
25678        chan3_raw: 0_u16,
25679        chan4_raw: 0_u16,
25680        chan5_raw: 0_u16,
25681        chan6_raw: 0_u16,
25682        chan7_raw: 0_u16,
25683        chan8_raw: 0_u16,
25684        chan9_raw: 0_u16,
25685        chan10_raw: 0_u16,
25686        chan11_raw: 0_u16,
25687        chan12_raw: 0_u16,
25688        chan13_raw: 0_u16,
25689        chan14_raw: 0_u16,
25690        chan15_raw: 0_u16,
25691        chan16_raw: 0_u16,
25692        chan17_raw: 0_u16,
25693        chan18_raw: 0_u16,
25694        chancount: 0_u8,
25695        rssi: 0_u8,
25696    };
25697    #[cfg(feature = "arbitrary")]
25698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25699        use arbitrary::{Arbitrary, Unstructured};
25700        let mut buf = [0u8; 1024];
25701        rng.fill_bytes(&mut buf);
25702        let mut unstructured = Unstructured::new(&buf);
25703        Self::arbitrary(&mut unstructured).unwrap_or_default()
25704    }
25705}
25706impl Default for RC_CHANNELS_DATA {
25707    fn default() -> Self {
25708        Self::DEFAULT.clone()
25709    }
25710}
25711impl MessageData for RC_CHANNELS_DATA {
25712    type Message = MavMessage;
25713    const ID: u32 = 65u32;
25714    const NAME: &'static str = "RC_CHANNELS";
25715    const EXTRA_CRC: u8 = 118u8;
25716    const ENCODED_LEN: usize = 42usize;
25717    fn deser(
25718        _version: MavlinkVersion,
25719        __input: &[u8],
25720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25721        let avail_len = __input.len();
25722        let mut payload_buf = [0; Self::ENCODED_LEN];
25723        let mut buf = if avail_len < Self::ENCODED_LEN {
25724            payload_buf[0..avail_len].copy_from_slice(__input);
25725            Bytes::new(&payload_buf)
25726        } else {
25727            Bytes::new(__input)
25728        };
25729        let mut __struct = Self::default();
25730        __struct.time_boot_ms = buf.get_u32_le()?;
25731        __struct.chan1_raw = buf.get_u16_le()?;
25732        __struct.chan2_raw = buf.get_u16_le()?;
25733        __struct.chan3_raw = buf.get_u16_le()?;
25734        __struct.chan4_raw = buf.get_u16_le()?;
25735        __struct.chan5_raw = buf.get_u16_le()?;
25736        __struct.chan6_raw = buf.get_u16_le()?;
25737        __struct.chan7_raw = buf.get_u16_le()?;
25738        __struct.chan8_raw = buf.get_u16_le()?;
25739        __struct.chan9_raw = buf.get_u16_le()?;
25740        __struct.chan10_raw = buf.get_u16_le()?;
25741        __struct.chan11_raw = buf.get_u16_le()?;
25742        __struct.chan12_raw = buf.get_u16_le()?;
25743        __struct.chan13_raw = buf.get_u16_le()?;
25744        __struct.chan14_raw = buf.get_u16_le()?;
25745        __struct.chan15_raw = buf.get_u16_le()?;
25746        __struct.chan16_raw = buf.get_u16_le()?;
25747        __struct.chan17_raw = buf.get_u16_le()?;
25748        __struct.chan18_raw = buf.get_u16_le()?;
25749        __struct.chancount = buf.get_u8()?;
25750        __struct.rssi = buf.get_u8()?;
25751        Ok(__struct)
25752    }
25753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25754        let mut __tmp = BytesMut::new(bytes);
25755        #[allow(clippy::absurd_extreme_comparisons)]
25756        #[allow(unused_comparisons)]
25757        if __tmp.remaining() < Self::ENCODED_LEN {
25758            panic!(
25759                "buffer is too small (need {} bytes, but got {})",
25760                Self::ENCODED_LEN,
25761                __tmp.remaining(),
25762            )
25763        }
25764        __tmp.put_u32_le(self.time_boot_ms);
25765        __tmp.put_u16_le(self.chan1_raw);
25766        __tmp.put_u16_le(self.chan2_raw);
25767        __tmp.put_u16_le(self.chan3_raw);
25768        __tmp.put_u16_le(self.chan4_raw);
25769        __tmp.put_u16_le(self.chan5_raw);
25770        __tmp.put_u16_le(self.chan6_raw);
25771        __tmp.put_u16_le(self.chan7_raw);
25772        __tmp.put_u16_le(self.chan8_raw);
25773        __tmp.put_u16_le(self.chan9_raw);
25774        __tmp.put_u16_le(self.chan10_raw);
25775        __tmp.put_u16_le(self.chan11_raw);
25776        __tmp.put_u16_le(self.chan12_raw);
25777        __tmp.put_u16_le(self.chan13_raw);
25778        __tmp.put_u16_le(self.chan14_raw);
25779        __tmp.put_u16_le(self.chan15_raw);
25780        __tmp.put_u16_le(self.chan16_raw);
25781        __tmp.put_u16_le(self.chan17_raw);
25782        __tmp.put_u16_le(self.chan18_raw);
25783        __tmp.put_u8(self.chancount);
25784        __tmp.put_u8(self.rssi);
25785        if matches!(version, MavlinkVersion::V2) {
25786            let len = __tmp.len();
25787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25788        } else {
25789            __tmp.len()
25790        }
25791    }
25792}
25793#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25794#[doc = ""]
25795#[doc = "ID: 70"]
25796#[derive(Debug, Clone, PartialEq)]
25797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25799#[cfg_attr(feature = "ts", derive(TS))]
25800#[cfg_attr(feature = "ts", ts(export))]
25801pub struct RC_CHANNELS_OVERRIDE_DATA {
25802    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25803    pub chan1_raw: u16,
25804    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25805    pub chan2_raw: u16,
25806    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25807    pub chan3_raw: u16,
25808    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25809    pub chan4_raw: u16,
25810    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25811    pub chan5_raw: u16,
25812    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25813    pub chan6_raw: u16,
25814    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25815    pub chan7_raw: u16,
25816    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25817    pub chan8_raw: u16,
25818    #[doc = "System ID"]
25819    pub target_system: u8,
25820    #[doc = "Component ID"]
25821    pub target_component: u8,
25822    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25824    pub chan9_raw: u16,
25825    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25827    pub chan10_raw: u16,
25828    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25830    pub chan11_raw: u16,
25831    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25833    pub chan12_raw: u16,
25834    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25836    pub chan13_raw: u16,
25837    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25839    pub chan14_raw: u16,
25840    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25842    pub chan15_raw: u16,
25843    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25844    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25845    pub chan16_raw: u16,
25846    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25848    pub chan17_raw: u16,
25849    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25851    pub chan18_raw: u16,
25852}
25853impl RC_CHANNELS_OVERRIDE_DATA {
25854    pub const ENCODED_LEN: usize = 38usize;
25855    pub const DEFAULT: Self = Self {
25856        chan1_raw: 0_u16,
25857        chan2_raw: 0_u16,
25858        chan3_raw: 0_u16,
25859        chan4_raw: 0_u16,
25860        chan5_raw: 0_u16,
25861        chan6_raw: 0_u16,
25862        chan7_raw: 0_u16,
25863        chan8_raw: 0_u16,
25864        target_system: 0_u8,
25865        target_component: 0_u8,
25866        chan9_raw: 0_u16,
25867        chan10_raw: 0_u16,
25868        chan11_raw: 0_u16,
25869        chan12_raw: 0_u16,
25870        chan13_raw: 0_u16,
25871        chan14_raw: 0_u16,
25872        chan15_raw: 0_u16,
25873        chan16_raw: 0_u16,
25874        chan17_raw: 0_u16,
25875        chan18_raw: 0_u16,
25876    };
25877    #[cfg(feature = "arbitrary")]
25878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25879        use arbitrary::{Arbitrary, Unstructured};
25880        let mut buf = [0u8; 1024];
25881        rng.fill_bytes(&mut buf);
25882        let mut unstructured = Unstructured::new(&buf);
25883        Self::arbitrary(&mut unstructured).unwrap_or_default()
25884    }
25885}
25886impl Default for RC_CHANNELS_OVERRIDE_DATA {
25887    fn default() -> Self {
25888        Self::DEFAULT.clone()
25889    }
25890}
25891impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25892    type Message = MavMessage;
25893    const ID: u32 = 70u32;
25894    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25895    const EXTRA_CRC: u8 = 124u8;
25896    const ENCODED_LEN: usize = 38usize;
25897    fn deser(
25898        _version: MavlinkVersion,
25899        __input: &[u8],
25900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25901        let avail_len = __input.len();
25902        let mut payload_buf = [0; Self::ENCODED_LEN];
25903        let mut buf = if avail_len < Self::ENCODED_LEN {
25904            payload_buf[0..avail_len].copy_from_slice(__input);
25905            Bytes::new(&payload_buf)
25906        } else {
25907            Bytes::new(__input)
25908        };
25909        let mut __struct = Self::default();
25910        __struct.chan1_raw = buf.get_u16_le()?;
25911        __struct.chan2_raw = buf.get_u16_le()?;
25912        __struct.chan3_raw = buf.get_u16_le()?;
25913        __struct.chan4_raw = buf.get_u16_le()?;
25914        __struct.chan5_raw = buf.get_u16_le()?;
25915        __struct.chan6_raw = buf.get_u16_le()?;
25916        __struct.chan7_raw = buf.get_u16_le()?;
25917        __struct.chan8_raw = buf.get_u16_le()?;
25918        __struct.target_system = buf.get_u8()?;
25919        __struct.target_component = buf.get_u8()?;
25920        __struct.chan9_raw = buf.get_u16_le()?;
25921        __struct.chan10_raw = buf.get_u16_le()?;
25922        __struct.chan11_raw = buf.get_u16_le()?;
25923        __struct.chan12_raw = buf.get_u16_le()?;
25924        __struct.chan13_raw = buf.get_u16_le()?;
25925        __struct.chan14_raw = buf.get_u16_le()?;
25926        __struct.chan15_raw = buf.get_u16_le()?;
25927        __struct.chan16_raw = buf.get_u16_le()?;
25928        __struct.chan17_raw = buf.get_u16_le()?;
25929        __struct.chan18_raw = buf.get_u16_le()?;
25930        Ok(__struct)
25931    }
25932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25933        let mut __tmp = BytesMut::new(bytes);
25934        #[allow(clippy::absurd_extreme_comparisons)]
25935        #[allow(unused_comparisons)]
25936        if __tmp.remaining() < Self::ENCODED_LEN {
25937            panic!(
25938                "buffer is too small (need {} bytes, but got {})",
25939                Self::ENCODED_LEN,
25940                __tmp.remaining(),
25941            )
25942        }
25943        __tmp.put_u16_le(self.chan1_raw);
25944        __tmp.put_u16_le(self.chan2_raw);
25945        __tmp.put_u16_le(self.chan3_raw);
25946        __tmp.put_u16_le(self.chan4_raw);
25947        __tmp.put_u16_le(self.chan5_raw);
25948        __tmp.put_u16_le(self.chan6_raw);
25949        __tmp.put_u16_le(self.chan7_raw);
25950        __tmp.put_u16_le(self.chan8_raw);
25951        __tmp.put_u8(self.target_system);
25952        __tmp.put_u8(self.target_component);
25953        if matches!(version, MavlinkVersion::V2) {
25954            __tmp.put_u16_le(self.chan9_raw);
25955            __tmp.put_u16_le(self.chan10_raw);
25956            __tmp.put_u16_le(self.chan11_raw);
25957            __tmp.put_u16_le(self.chan12_raw);
25958            __tmp.put_u16_le(self.chan13_raw);
25959            __tmp.put_u16_le(self.chan14_raw);
25960            __tmp.put_u16_le(self.chan15_raw);
25961            __tmp.put_u16_le(self.chan16_raw);
25962            __tmp.put_u16_le(self.chan17_raw);
25963            __tmp.put_u16_le(self.chan18_raw);
25964            let len = __tmp.len();
25965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25966        } else {
25967            __tmp.len()
25968        }
25969    }
25970}
25971#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25972#[doc = ""]
25973#[doc = "ID: 35"]
25974#[derive(Debug, Clone, PartialEq)]
25975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25977#[cfg_attr(feature = "ts", derive(TS))]
25978#[cfg_attr(feature = "ts", ts(export))]
25979pub struct RC_CHANNELS_RAW_DATA {
25980    #[doc = "Timestamp (time since system boot)."]
25981    pub time_boot_ms: u32,
25982    #[doc = "RC channel 1 value."]
25983    pub chan1_raw: u16,
25984    #[doc = "RC channel 2 value."]
25985    pub chan2_raw: u16,
25986    #[doc = "RC channel 3 value."]
25987    pub chan3_raw: u16,
25988    #[doc = "RC channel 4 value."]
25989    pub chan4_raw: u16,
25990    #[doc = "RC channel 5 value."]
25991    pub chan5_raw: u16,
25992    #[doc = "RC channel 6 value."]
25993    pub chan6_raw: u16,
25994    #[doc = "RC channel 7 value."]
25995    pub chan7_raw: u16,
25996    #[doc = "RC channel 8 value."]
25997    pub chan8_raw: u16,
25998    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25999    pub port: u8,
26000    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26001    pub rssi: u8,
26002}
26003impl RC_CHANNELS_RAW_DATA {
26004    pub const ENCODED_LEN: usize = 22usize;
26005    pub const DEFAULT: Self = Self {
26006        time_boot_ms: 0_u32,
26007        chan1_raw: 0_u16,
26008        chan2_raw: 0_u16,
26009        chan3_raw: 0_u16,
26010        chan4_raw: 0_u16,
26011        chan5_raw: 0_u16,
26012        chan6_raw: 0_u16,
26013        chan7_raw: 0_u16,
26014        chan8_raw: 0_u16,
26015        port: 0_u8,
26016        rssi: 0_u8,
26017    };
26018    #[cfg(feature = "arbitrary")]
26019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26020        use arbitrary::{Arbitrary, Unstructured};
26021        let mut buf = [0u8; 1024];
26022        rng.fill_bytes(&mut buf);
26023        let mut unstructured = Unstructured::new(&buf);
26024        Self::arbitrary(&mut unstructured).unwrap_or_default()
26025    }
26026}
26027impl Default for RC_CHANNELS_RAW_DATA {
26028    fn default() -> Self {
26029        Self::DEFAULT.clone()
26030    }
26031}
26032impl MessageData for RC_CHANNELS_RAW_DATA {
26033    type Message = MavMessage;
26034    const ID: u32 = 35u32;
26035    const NAME: &'static str = "RC_CHANNELS_RAW";
26036    const EXTRA_CRC: u8 = 244u8;
26037    const ENCODED_LEN: usize = 22usize;
26038    fn deser(
26039        _version: MavlinkVersion,
26040        __input: &[u8],
26041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26042        let avail_len = __input.len();
26043        let mut payload_buf = [0; Self::ENCODED_LEN];
26044        let mut buf = if avail_len < Self::ENCODED_LEN {
26045            payload_buf[0..avail_len].copy_from_slice(__input);
26046            Bytes::new(&payload_buf)
26047        } else {
26048            Bytes::new(__input)
26049        };
26050        let mut __struct = Self::default();
26051        __struct.time_boot_ms = buf.get_u32_le()?;
26052        __struct.chan1_raw = buf.get_u16_le()?;
26053        __struct.chan2_raw = buf.get_u16_le()?;
26054        __struct.chan3_raw = buf.get_u16_le()?;
26055        __struct.chan4_raw = buf.get_u16_le()?;
26056        __struct.chan5_raw = buf.get_u16_le()?;
26057        __struct.chan6_raw = buf.get_u16_le()?;
26058        __struct.chan7_raw = buf.get_u16_le()?;
26059        __struct.chan8_raw = buf.get_u16_le()?;
26060        __struct.port = buf.get_u8()?;
26061        __struct.rssi = buf.get_u8()?;
26062        Ok(__struct)
26063    }
26064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26065        let mut __tmp = BytesMut::new(bytes);
26066        #[allow(clippy::absurd_extreme_comparisons)]
26067        #[allow(unused_comparisons)]
26068        if __tmp.remaining() < Self::ENCODED_LEN {
26069            panic!(
26070                "buffer is too small (need {} bytes, but got {})",
26071                Self::ENCODED_LEN,
26072                __tmp.remaining(),
26073            )
26074        }
26075        __tmp.put_u32_le(self.time_boot_ms);
26076        __tmp.put_u16_le(self.chan1_raw);
26077        __tmp.put_u16_le(self.chan2_raw);
26078        __tmp.put_u16_le(self.chan3_raw);
26079        __tmp.put_u16_le(self.chan4_raw);
26080        __tmp.put_u16_le(self.chan5_raw);
26081        __tmp.put_u16_le(self.chan6_raw);
26082        __tmp.put_u16_le(self.chan7_raw);
26083        __tmp.put_u16_le(self.chan8_raw);
26084        __tmp.put_u8(self.port);
26085        __tmp.put_u8(self.rssi);
26086        if matches!(version, MavlinkVersion::V2) {
26087            let len = __tmp.len();
26088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26089        } else {
26090            __tmp.len()
26091        }
26092    }
26093}
26094#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26095#[doc = ""]
26096#[doc = "ID: 34"]
26097#[derive(Debug, Clone, PartialEq)]
26098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26100#[cfg_attr(feature = "ts", derive(TS))]
26101#[cfg_attr(feature = "ts", ts(export))]
26102pub struct RC_CHANNELS_SCALED_DATA {
26103    #[doc = "Timestamp (time since system boot)."]
26104    pub time_boot_ms: u32,
26105    #[doc = "RC channel 1 value scaled."]
26106    pub chan1_scaled: i16,
26107    #[doc = "RC channel 2 value scaled."]
26108    pub chan2_scaled: i16,
26109    #[doc = "RC channel 3 value scaled."]
26110    pub chan3_scaled: i16,
26111    #[doc = "RC channel 4 value scaled."]
26112    pub chan4_scaled: i16,
26113    #[doc = "RC channel 5 value scaled."]
26114    pub chan5_scaled: i16,
26115    #[doc = "RC channel 6 value scaled."]
26116    pub chan6_scaled: i16,
26117    #[doc = "RC channel 7 value scaled."]
26118    pub chan7_scaled: i16,
26119    #[doc = "RC channel 8 value scaled."]
26120    pub chan8_scaled: i16,
26121    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26122    pub port: u8,
26123    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26124    pub rssi: u8,
26125}
26126impl RC_CHANNELS_SCALED_DATA {
26127    pub const ENCODED_LEN: usize = 22usize;
26128    pub const DEFAULT: Self = Self {
26129        time_boot_ms: 0_u32,
26130        chan1_scaled: 0_i16,
26131        chan2_scaled: 0_i16,
26132        chan3_scaled: 0_i16,
26133        chan4_scaled: 0_i16,
26134        chan5_scaled: 0_i16,
26135        chan6_scaled: 0_i16,
26136        chan7_scaled: 0_i16,
26137        chan8_scaled: 0_i16,
26138        port: 0_u8,
26139        rssi: 0_u8,
26140    };
26141    #[cfg(feature = "arbitrary")]
26142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26143        use arbitrary::{Arbitrary, Unstructured};
26144        let mut buf = [0u8; 1024];
26145        rng.fill_bytes(&mut buf);
26146        let mut unstructured = Unstructured::new(&buf);
26147        Self::arbitrary(&mut unstructured).unwrap_or_default()
26148    }
26149}
26150impl Default for RC_CHANNELS_SCALED_DATA {
26151    fn default() -> Self {
26152        Self::DEFAULT.clone()
26153    }
26154}
26155impl MessageData for RC_CHANNELS_SCALED_DATA {
26156    type Message = MavMessage;
26157    const ID: u32 = 34u32;
26158    const NAME: &'static str = "RC_CHANNELS_SCALED";
26159    const EXTRA_CRC: u8 = 237u8;
26160    const ENCODED_LEN: usize = 22usize;
26161    fn deser(
26162        _version: MavlinkVersion,
26163        __input: &[u8],
26164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26165        let avail_len = __input.len();
26166        let mut payload_buf = [0; Self::ENCODED_LEN];
26167        let mut buf = if avail_len < Self::ENCODED_LEN {
26168            payload_buf[0..avail_len].copy_from_slice(__input);
26169            Bytes::new(&payload_buf)
26170        } else {
26171            Bytes::new(__input)
26172        };
26173        let mut __struct = Self::default();
26174        __struct.time_boot_ms = buf.get_u32_le()?;
26175        __struct.chan1_scaled = buf.get_i16_le()?;
26176        __struct.chan2_scaled = buf.get_i16_le()?;
26177        __struct.chan3_scaled = buf.get_i16_le()?;
26178        __struct.chan4_scaled = buf.get_i16_le()?;
26179        __struct.chan5_scaled = buf.get_i16_le()?;
26180        __struct.chan6_scaled = buf.get_i16_le()?;
26181        __struct.chan7_scaled = buf.get_i16_le()?;
26182        __struct.chan8_scaled = buf.get_i16_le()?;
26183        __struct.port = buf.get_u8()?;
26184        __struct.rssi = buf.get_u8()?;
26185        Ok(__struct)
26186    }
26187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26188        let mut __tmp = BytesMut::new(bytes);
26189        #[allow(clippy::absurd_extreme_comparisons)]
26190        #[allow(unused_comparisons)]
26191        if __tmp.remaining() < Self::ENCODED_LEN {
26192            panic!(
26193                "buffer is too small (need {} bytes, but got {})",
26194                Self::ENCODED_LEN,
26195                __tmp.remaining(),
26196            )
26197        }
26198        __tmp.put_u32_le(self.time_boot_ms);
26199        __tmp.put_i16_le(self.chan1_scaled);
26200        __tmp.put_i16_le(self.chan2_scaled);
26201        __tmp.put_i16_le(self.chan3_scaled);
26202        __tmp.put_i16_le(self.chan4_scaled);
26203        __tmp.put_i16_le(self.chan5_scaled);
26204        __tmp.put_i16_le(self.chan6_scaled);
26205        __tmp.put_i16_le(self.chan7_scaled);
26206        __tmp.put_i16_le(self.chan8_scaled);
26207        __tmp.put_u8(self.port);
26208        __tmp.put_u8(self.rssi);
26209        if matches!(version, MavlinkVersion::V2) {
26210            let len = __tmp.len();
26211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26212        } else {
26213            __tmp.len()
26214        }
26215    }
26216}
26217#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26218#[doc = "Request a data stream."]
26219#[doc = ""]
26220#[doc = "ID: 66"]
26221#[derive(Debug, Clone, PartialEq)]
26222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26224#[cfg_attr(feature = "ts", derive(TS))]
26225#[cfg_attr(feature = "ts", ts(export))]
26226pub struct REQUEST_DATA_STREAM_DATA {
26227    #[doc = "The requested message rate"]
26228    pub req_message_rate: u16,
26229    #[doc = "The target requested to send the message stream."]
26230    pub target_system: u8,
26231    #[doc = "The target requested to send the message stream."]
26232    pub target_component: u8,
26233    #[doc = "The ID of the requested data stream"]
26234    pub req_stream_id: u8,
26235    #[doc = "1 to start sending, 0 to stop sending."]
26236    pub start_stop: u8,
26237}
26238impl REQUEST_DATA_STREAM_DATA {
26239    pub const ENCODED_LEN: usize = 6usize;
26240    pub const DEFAULT: Self = Self {
26241        req_message_rate: 0_u16,
26242        target_system: 0_u8,
26243        target_component: 0_u8,
26244        req_stream_id: 0_u8,
26245        start_stop: 0_u8,
26246    };
26247    #[cfg(feature = "arbitrary")]
26248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26249        use arbitrary::{Arbitrary, Unstructured};
26250        let mut buf = [0u8; 1024];
26251        rng.fill_bytes(&mut buf);
26252        let mut unstructured = Unstructured::new(&buf);
26253        Self::arbitrary(&mut unstructured).unwrap_or_default()
26254    }
26255}
26256impl Default for REQUEST_DATA_STREAM_DATA {
26257    fn default() -> Self {
26258        Self::DEFAULT.clone()
26259    }
26260}
26261impl MessageData for REQUEST_DATA_STREAM_DATA {
26262    type Message = MavMessage;
26263    const ID: u32 = 66u32;
26264    const NAME: &'static str = "REQUEST_DATA_STREAM";
26265    const EXTRA_CRC: u8 = 148u8;
26266    const ENCODED_LEN: usize = 6usize;
26267    fn deser(
26268        _version: MavlinkVersion,
26269        __input: &[u8],
26270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26271        let avail_len = __input.len();
26272        let mut payload_buf = [0; Self::ENCODED_LEN];
26273        let mut buf = if avail_len < Self::ENCODED_LEN {
26274            payload_buf[0..avail_len].copy_from_slice(__input);
26275            Bytes::new(&payload_buf)
26276        } else {
26277            Bytes::new(__input)
26278        };
26279        let mut __struct = Self::default();
26280        __struct.req_message_rate = buf.get_u16_le()?;
26281        __struct.target_system = buf.get_u8()?;
26282        __struct.target_component = buf.get_u8()?;
26283        __struct.req_stream_id = buf.get_u8()?;
26284        __struct.start_stop = buf.get_u8()?;
26285        Ok(__struct)
26286    }
26287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26288        let mut __tmp = BytesMut::new(bytes);
26289        #[allow(clippy::absurd_extreme_comparisons)]
26290        #[allow(unused_comparisons)]
26291        if __tmp.remaining() < Self::ENCODED_LEN {
26292            panic!(
26293                "buffer is too small (need {} bytes, but got {})",
26294                Self::ENCODED_LEN,
26295                __tmp.remaining(),
26296            )
26297        }
26298        __tmp.put_u16_le(self.req_message_rate);
26299        __tmp.put_u8(self.target_system);
26300        __tmp.put_u8(self.target_component);
26301        __tmp.put_u8(self.req_stream_id);
26302        __tmp.put_u8(self.start_stop);
26303        if matches!(version, MavlinkVersion::V2) {
26304            let len = __tmp.len();
26305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26306        } else {
26307            __tmp.len()
26308        }
26309    }
26310}
26311#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26312#[doc = ""]
26313#[doc = "ID: 412"]
26314#[derive(Debug, Clone, PartialEq)]
26315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26317#[cfg_attr(feature = "ts", derive(TS))]
26318#[cfg_attr(feature = "ts", ts(export))]
26319pub struct REQUEST_EVENT_DATA {
26320    #[doc = "First sequence number of the requested event."]
26321    pub first_sequence: u16,
26322    #[doc = "Last sequence number of the requested event."]
26323    pub last_sequence: u16,
26324    #[doc = "System ID"]
26325    pub target_system: u8,
26326    #[doc = "Component ID"]
26327    pub target_component: u8,
26328}
26329impl REQUEST_EVENT_DATA {
26330    pub const ENCODED_LEN: usize = 6usize;
26331    pub const DEFAULT: Self = Self {
26332        first_sequence: 0_u16,
26333        last_sequence: 0_u16,
26334        target_system: 0_u8,
26335        target_component: 0_u8,
26336    };
26337    #[cfg(feature = "arbitrary")]
26338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26339        use arbitrary::{Arbitrary, Unstructured};
26340        let mut buf = [0u8; 1024];
26341        rng.fill_bytes(&mut buf);
26342        let mut unstructured = Unstructured::new(&buf);
26343        Self::arbitrary(&mut unstructured).unwrap_or_default()
26344    }
26345}
26346impl Default for REQUEST_EVENT_DATA {
26347    fn default() -> Self {
26348        Self::DEFAULT.clone()
26349    }
26350}
26351impl MessageData for REQUEST_EVENT_DATA {
26352    type Message = MavMessage;
26353    const ID: u32 = 412u32;
26354    const NAME: &'static str = "REQUEST_EVENT";
26355    const EXTRA_CRC: u8 = 33u8;
26356    const ENCODED_LEN: usize = 6usize;
26357    fn deser(
26358        _version: MavlinkVersion,
26359        __input: &[u8],
26360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26361        let avail_len = __input.len();
26362        let mut payload_buf = [0; Self::ENCODED_LEN];
26363        let mut buf = if avail_len < Self::ENCODED_LEN {
26364            payload_buf[0..avail_len].copy_from_slice(__input);
26365            Bytes::new(&payload_buf)
26366        } else {
26367            Bytes::new(__input)
26368        };
26369        let mut __struct = Self::default();
26370        __struct.first_sequence = buf.get_u16_le()?;
26371        __struct.last_sequence = buf.get_u16_le()?;
26372        __struct.target_system = buf.get_u8()?;
26373        __struct.target_component = buf.get_u8()?;
26374        Ok(__struct)
26375    }
26376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26377        let mut __tmp = BytesMut::new(bytes);
26378        #[allow(clippy::absurd_extreme_comparisons)]
26379        #[allow(unused_comparisons)]
26380        if __tmp.remaining() < Self::ENCODED_LEN {
26381            panic!(
26382                "buffer is too small (need {} bytes, but got {})",
26383                Self::ENCODED_LEN,
26384                __tmp.remaining(),
26385            )
26386        }
26387        __tmp.put_u16_le(self.first_sequence);
26388        __tmp.put_u16_le(self.last_sequence);
26389        __tmp.put_u8(self.target_system);
26390        __tmp.put_u8(self.target_component);
26391        if matches!(version, MavlinkVersion::V2) {
26392            let len = __tmp.len();
26393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26394        } else {
26395            __tmp.len()
26396        }
26397    }
26398}
26399#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26400#[doc = ""]
26401#[doc = "ID: 142"]
26402#[derive(Debug, Clone, PartialEq)]
26403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26405#[cfg_attr(feature = "ts", derive(TS))]
26406#[cfg_attr(feature = "ts", ts(export))]
26407pub struct RESOURCE_REQUEST_DATA {
26408    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26409    pub request_id: u8,
26410    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26411    pub uri_type: u8,
26412    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26415    pub uri: [u8; 120],
26416    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26417    pub transfer_type: u8,
26418    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26421    pub storage: [u8; 120],
26422}
26423impl RESOURCE_REQUEST_DATA {
26424    pub const ENCODED_LEN: usize = 243usize;
26425    pub const DEFAULT: Self = Self {
26426        request_id: 0_u8,
26427        uri_type: 0_u8,
26428        uri: [0_u8; 120usize],
26429        transfer_type: 0_u8,
26430        storage: [0_u8; 120usize],
26431    };
26432    #[cfg(feature = "arbitrary")]
26433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26434        use arbitrary::{Arbitrary, Unstructured};
26435        let mut buf = [0u8; 1024];
26436        rng.fill_bytes(&mut buf);
26437        let mut unstructured = Unstructured::new(&buf);
26438        Self::arbitrary(&mut unstructured).unwrap_or_default()
26439    }
26440}
26441impl Default for RESOURCE_REQUEST_DATA {
26442    fn default() -> Self {
26443        Self::DEFAULT.clone()
26444    }
26445}
26446impl MessageData for RESOURCE_REQUEST_DATA {
26447    type Message = MavMessage;
26448    const ID: u32 = 142u32;
26449    const NAME: &'static str = "RESOURCE_REQUEST";
26450    const EXTRA_CRC: u8 = 72u8;
26451    const ENCODED_LEN: usize = 243usize;
26452    fn deser(
26453        _version: MavlinkVersion,
26454        __input: &[u8],
26455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26456        let avail_len = __input.len();
26457        let mut payload_buf = [0; Self::ENCODED_LEN];
26458        let mut buf = if avail_len < Self::ENCODED_LEN {
26459            payload_buf[0..avail_len].copy_from_slice(__input);
26460            Bytes::new(&payload_buf)
26461        } else {
26462            Bytes::new(__input)
26463        };
26464        let mut __struct = Self::default();
26465        __struct.request_id = buf.get_u8()?;
26466        __struct.uri_type = buf.get_u8()?;
26467        for v in &mut __struct.uri {
26468            let val = buf.get_u8()?;
26469            *v = val;
26470        }
26471        __struct.transfer_type = buf.get_u8()?;
26472        for v in &mut __struct.storage {
26473            let val = buf.get_u8()?;
26474            *v = val;
26475        }
26476        Ok(__struct)
26477    }
26478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26479        let mut __tmp = BytesMut::new(bytes);
26480        #[allow(clippy::absurd_extreme_comparisons)]
26481        #[allow(unused_comparisons)]
26482        if __tmp.remaining() < Self::ENCODED_LEN {
26483            panic!(
26484                "buffer is too small (need {} bytes, but got {})",
26485                Self::ENCODED_LEN,
26486                __tmp.remaining(),
26487            )
26488        }
26489        __tmp.put_u8(self.request_id);
26490        __tmp.put_u8(self.uri_type);
26491        for val in &self.uri {
26492            __tmp.put_u8(*val);
26493        }
26494        __tmp.put_u8(self.transfer_type);
26495        for val in &self.storage {
26496            __tmp.put_u8(*val);
26497        }
26498        if matches!(version, MavlinkVersion::V2) {
26499            let len = __tmp.len();
26500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26501        } else {
26502            __tmp.len()
26503        }
26504    }
26505}
26506#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26507#[doc = ""]
26508#[doc = "ID: 413"]
26509#[derive(Debug, Clone, PartialEq)]
26510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26512#[cfg_attr(feature = "ts", derive(TS))]
26513#[cfg_attr(feature = "ts", ts(export))]
26514pub struct RESPONSE_EVENT_ERROR_DATA {
26515    #[doc = "Sequence number."]
26516    pub sequence: u16,
26517    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26518    pub sequence_oldest_available: u16,
26519    #[doc = "System ID"]
26520    pub target_system: u8,
26521    #[doc = "Component ID"]
26522    pub target_component: u8,
26523    #[doc = "Error reason."]
26524    pub reason: MavEventErrorReason,
26525}
26526impl RESPONSE_EVENT_ERROR_DATA {
26527    pub const ENCODED_LEN: usize = 7usize;
26528    pub const DEFAULT: Self = Self {
26529        sequence: 0_u16,
26530        sequence_oldest_available: 0_u16,
26531        target_system: 0_u8,
26532        target_component: 0_u8,
26533        reason: MavEventErrorReason::DEFAULT,
26534    };
26535    #[cfg(feature = "arbitrary")]
26536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26537        use arbitrary::{Arbitrary, Unstructured};
26538        let mut buf = [0u8; 1024];
26539        rng.fill_bytes(&mut buf);
26540        let mut unstructured = Unstructured::new(&buf);
26541        Self::arbitrary(&mut unstructured).unwrap_or_default()
26542    }
26543}
26544impl Default for RESPONSE_EVENT_ERROR_DATA {
26545    fn default() -> Self {
26546        Self::DEFAULT.clone()
26547    }
26548}
26549impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26550    type Message = MavMessage;
26551    const ID: u32 = 413u32;
26552    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26553    const EXTRA_CRC: u8 = 77u8;
26554    const ENCODED_LEN: usize = 7usize;
26555    fn deser(
26556        _version: MavlinkVersion,
26557        __input: &[u8],
26558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26559        let avail_len = __input.len();
26560        let mut payload_buf = [0; Self::ENCODED_LEN];
26561        let mut buf = if avail_len < Self::ENCODED_LEN {
26562            payload_buf[0..avail_len].copy_from_slice(__input);
26563            Bytes::new(&payload_buf)
26564        } else {
26565            Bytes::new(__input)
26566        };
26567        let mut __struct = Self::default();
26568        __struct.sequence = buf.get_u16_le()?;
26569        __struct.sequence_oldest_available = buf.get_u16_le()?;
26570        __struct.target_system = buf.get_u8()?;
26571        __struct.target_component = buf.get_u8()?;
26572        let tmp = buf.get_u8()?;
26573        __struct.reason =
26574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26575                enum_type: "MavEventErrorReason",
26576                value: tmp as u64,
26577            })?;
26578        Ok(__struct)
26579    }
26580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26581        let mut __tmp = BytesMut::new(bytes);
26582        #[allow(clippy::absurd_extreme_comparisons)]
26583        #[allow(unused_comparisons)]
26584        if __tmp.remaining() < Self::ENCODED_LEN {
26585            panic!(
26586                "buffer is too small (need {} bytes, but got {})",
26587                Self::ENCODED_LEN,
26588                __tmp.remaining(),
26589            )
26590        }
26591        __tmp.put_u16_le(self.sequence);
26592        __tmp.put_u16_le(self.sequence_oldest_available);
26593        __tmp.put_u8(self.target_system);
26594        __tmp.put_u8(self.target_component);
26595        __tmp.put_u8(self.reason as u8);
26596        if matches!(version, MavlinkVersion::V2) {
26597            let len = __tmp.len();
26598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26599        } else {
26600            __tmp.len()
26601        }
26602    }
26603}
26604#[doc = "Read out the safety zone the MAV currently assumes."]
26605#[doc = ""]
26606#[doc = "ID: 55"]
26607#[derive(Debug, Clone, PartialEq)]
26608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26610#[cfg_attr(feature = "ts", derive(TS))]
26611#[cfg_attr(feature = "ts", ts(export))]
26612pub struct SAFETY_ALLOWED_AREA_DATA {
26613    #[doc = "x position 1 / Latitude 1"]
26614    pub p1x: f32,
26615    #[doc = "y position 1 / Longitude 1"]
26616    pub p1y: f32,
26617    #[doc = "z position 1 / Altitude 1"]
26618    pub p1z: f32,
26619    #[doc = "x position 2 / Latitude 2"]
26620    pub p2x: f32,
26621    #[doc = "y position 2 / Longitude 2"]
26622    pub p2y: f32,
26623    #[doc = "z position 2 / Altitude 2"]
26624    pub p2z: f32,
26625    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26626    pub frame: MavFrame,
26627}
26628impl SAFETY_ALLOWED_AREA_DATA {
26629    pub const ENCODED_LEN: usize = 25usize;
26630    pub const DEFAULT: Self = Self {
26631        p1x: 0.0_f32,
26632        p1y: 0.0_f32,
26633        p1z: 0.0_f32,
26634        p2x: 0.0_f32,
26635        p2y: 0.0_f32,
26636        p2z: 0.0_f32,
26637        frame: MavFrame::DEFAULT,
26638    };
26639    #[cfg(feature = "arbitrary")]
26640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26641        use arbitrary::{Arbitrary, Unstructured};
26642        let mut buf = [0u8; 1024];
26643        rng.fill_bytes(&mut buf);
26644        let mut unstructured = Unstructured::new(&buf);
26645        Self::arbitrary(&mut unstructured).unwrap_or_default()
26646    }
26647}
26648impl Default for SAFETY_ALLOWED_AREA_DATA {
26649    fn default() -> Self {
26650        Self::DEFAULT.clone()
26651    }
26652}
26653impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26654    type Message = MavMessage;
26655    const ID: u32 = 55u32;
26656    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26657    const EXTRA_CRC: u8 = 3u8;
26658    const ENCODED_LEN: usize = 25usize;
26659    fn deser(
26660        _version: MavlinkVersion,
26661        __input: &[u8],
26662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26663        let avail_len = __input.len();
26664        let mut payload_buf = [0; Self::ENCODED_LEN];
26665        let mut buf = if avail_len < Self::ENCODED_LEN {
26666            payload_buf[0..avail_len].copy_from_slice(__input);
26667            Bytes::new(&payload_buf)
26668        } else {
26669            Bytes::new(__input)
26670        };
26671        let mut __struct = Self::default();
26672        __struct.p1x = buf.get_f32_le()?;
26673        __struct.p1y = buf.get_f32_le()?;
26674        __struct.p1z = buf.get_f32_le()?;
26675        __struct.p2x = buf.get_f32_le()?;
26676        __struct.p2y = buf.get_f32_le()?;
26677        __struct.p2z = buf.get_f32_le()?;
26678        let tmp = buf.get_u8()?;
26679        __struct.frame =
26680            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26681                enum_type: "MavFrame",
26682                value: tmp as u64,
26683            })?;
26684        Ok(__struct)
26685    }
26686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26687        let mut __tmp = BytesMut::new(bytes);
26688        #[allow(clippy::absurd_extreme_comparisons)]
26689        #[allow(unused_comparisons)]
26690        if __tmp.remaining() < Self::ENCODED_LEN {
26691            panic!(
26692                "buffer is too small (need {} bytes, but got {})",
26693                Self::ENCODED_LEN,
26694                __tmp.remaining(),
26695            )
26696        }
26697        __tmp.put_f32_le(self.p1x);
26698        __tmp.put_f32_le(self.p1y);
26699        __tmp.put_f32_le(self.p1z);
26700        __tmp.put_f32_le(self.p2x);
26701        __tmp.put_f32_le(self.p2y);
26702        __tmp.put_f32_le(self.p2z);
26703        __tmp.put_u8(self.frame as u8);
26704        if matches!(version, MavlinkVersion::V2) {
26705            let len = __tmp.len();
26706            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26707        } else {
26708            __tmp.len()
26709        }
26710    }
26711}
26712#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26713#[doc = ""]
26714#[doc = "ID: 54"]
26715#[derive(Debug, Clone, PartialEq)]
26716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26718#[cfg_attr(feature = "ts", derive(TS))]
26719#[cfg_attr(feature = "ts", ts(export))]
26720pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26721    #[doc = "x position 1 / Latitude 1"]
26722    pub p1x: f32,
26723    #[doc = "y position 1 / Longitude 1"]
26724    pub p1y: f32,
26725    #[doc = "z position 1 / Altitude 1"]
26726    pub p1z: f32,
26727    #[doc = "x position 2 / Latitude 2"]
26728    pub p2x: f32,
26729    #[doc = "y position 2 / Longitude 2"]
26730    pub p2y: f32,
26731    #[doc = "z position 2 / Altitude 2"]
26732    pub p2z: f32,
26733    #[doc = "System ID"]
26734    pub target_system: u8,
26735    #[doc = "Component ID"]
26736    pub target_component: u8,
26737    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26738    pub frame: MavFrame,
26739}
26740impl SAFETY_SET_ALLOWED_AREA_DATA {
26741    pub const ENCODED_LEN: usize = 27usize;
26742    pub const DEFAULT: Self = Self {
26743        p1x: 0.0_f32,
26744        p1y: 0.0_f32,
26745        p1z: 0.0_f32,
26746        p2x: 0.0_f32,
26747        p2y: 0.0_f32,
26748        p2z: 0.0_f32,
26749        target_system: 0_u8,
26750        target_component: 0_u8,
26751        frame: MavFrame::DEFAULT,
26752    };
26753    #[cfg(feature = "arbitrary")]
26754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26755        use arbitrary::{Arbitrary, Unstructured};
26756        let mut buf = [0u8; 1024];
26757        rng.fill_bytes(&mut buf);
26758        let mut unstructured = Unstructured::new(&buf);
26759        Self::arbitrary(&mut unstructured).unwrap_or_default()
26760    }
26761}
26762impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26763    fn default() -> Self {
26764        Self::DEFAULT.clone()
26765    }
26766}
26767impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26768    type Message = MavMessage;
26769    const ID: u32 = 54u32;
26770    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26771    const EXTRA_CRC: u8 = 15u8;
26772    const ENCODED_LEN: usize = 27usize;
26773    fn deser(
26774        _version: MavlinkVersion,
26775        __input: &[u8],
26776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26777        let avail_len = __input.len();
26778        let mut payload_buf = [0; Self::ENCODED_LEN];
26779        let mut buf = if avail_len < Self::ENCODED_LEN {
26780            payload_buf[0..avail_len].copy_from_slice(__input);
26781            Bytes::new(&payload_buf)
26782        } else {
26783            Bytes::new(__input)
26784        };
26785        let mut __struct = Self::default();
26786        __struct.p1x = buf.get_f32_le()?;
26787        __struct.p1y = buf.get_f32_le()?;
26788        __struct.p1z = buf.get_f32_le()?;
26789        __struct.p2x = buf.get_f32_le()?;
26790        __struct.p2y = buf.get_f32_le()?;
26791        __struct.p2z = buf.get_f32_le()?;
26792        __struct.target_system = buf.get_u8()?;
26793        __struct.target_component = buf.get_u8()?;
26794        let tmp = buf.get_u8()?;
26795        __struct.frame =
26796            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26797                enum_type: "MavFrame",
26798                value: tmp as u64,
26799            })?;
26800        Ok(__struct)
26801    }
26802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26803        let mut __tmp = BytesMut::new(bytes);
26804        #[allow(clippy::absurd_extreme_comparisons)]
26805        #[allow(unused_comparisons)]
26806        if __tmp.remaining() < Self::ENCODED_LEN {
26807            panic!(
26808                "buffer is too small (need {} bytes, but got {})",
26809                Self::ENCODED_LEN,
26810                __tmp.remaining(),
26811            )
26812        }
26813        __tmp.put_f32_le(self.p1x);
26814        __tmp.put_f32_le(self.p1y);
26815        __tmp.put_f32_le(self.p1z);
26816        __tmp.put_f32_le(self.p2x);
26817        __tmp.put_f32_le(self.p2y);
26818        __tmp.put_f32_le(self.p2z);
26819        __tmp.put_u8(self.target_system);
26820        __tmp.put_u8(self.target_component);
26821        __tmp.put_u8(self.frame as u8);
26822        if matches!(version, MavlinkVersion::V2) {
26823            let len = __tmp.len();
26824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26825        } else {
26826            __tmp.len()
26827        }
26828    }
26829}
26830#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26831#[doc = ""]
26832#[doc = "ID: 26"]
26833#[derive(Debug, Clone, PartialEq)]
26834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26836#[cfg_attr(feature = "ts", derive(TS))]
26837#[cfg_attr(feature = "ts", ts(export))]
26838pub struct SCALED_IMU_DATA {
26839    #[doc = "Timestamp (time since system boot)."]
26840    pub time_boot_ms: u32,
26841    #[doc = "X acceleration"]
26842    pub xacc: i16,
26843    #[doc = "Y acceleration"]
26844    pub yacc: i16,
26845    #[doc = "Z acceleration"]
26846    pub zacc: i16,
26847    #[doc = "Angular speed around X axis"]
26848    pub xgyro: i16,
26849    #[doc = "Angular speed around Y axis"]
26850    pub ygyro: i16,
26851    #[doc = "Angular speed around Z axis"]
26852    pub zgyro: i16,
26853    #[doc = "X Magnetic field"]
26854    pub xmag: i16,
26855    #[doc = "Y Magnetic field"]
26856    pub ymag: i16,
26857    #[doc = "Z Magnetic field"]
26858    pub zmag: i16,
26859    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26860    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26861    pub temperature: i16,
26862}
26863impl SCALED_IMU_DATA {
26864    pub const ENCODED_LEN: usize = 24usize;
26865    pub const DEFAULT: Self = Self {
26866        time_boot_ms: 0_u32,
26867        xacc: 0_i16,
26868        yacc: 0_i16,
26869        zacc: 0_i16,
26870        xgyro: 0_i16,
26871        ygyro: 0_i16,
26872        zgyro: 0_i16,
26873        xmag: 0_i16,
26874        ymag: 0_i16,
26875        zmag: 0_i16,
26876        temperature: 0_i16,
26877    };
26878    #[cfg(feature = "arbitrary")]
26879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26880        use arbitrary::{Arbitrary, Unstructured};
26881        let mut buf = [0u8; 1024];
26882        rng.fill_bytes(&mut buf);
26883        let mut unstructured = Unstructured::new(&buf);
26884        Self::arbitrary(&mut unstructured).unwrap_or_default()
26885    }
26886}
26887impl Default for SCALED_IMU_DATA {
26888    fn default() -> Self {
26889        Self::DEFAULT.clone()
26890    }
26891}
26892impl MessageData for SCALED_IMU_DATA {
26893    type Message = MavMessage;
26894    const ID: u32 = 26u32;
26895    const NAME: &'static str = "SCALED_IMU";
26896    const EXTRA_CRC: u8 = 170u8;
26897    const ENCODED_LEN: usize = 24usize;
26898    fn deser(
26899        _version: MavlinkVersion,
26900        __input: &[u8],
26901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26902        let avail_len = __input.len();
26903        let mut payload_buf = [0; Self::ENCODED_LEN];
26904        let mut buf = if avail_len < Self::ENCODED_LEN {
26905            payload_buf[0..avail_len].copy_from_slice(__input);
26906            Bytes::new(&payload_buf)
26907        } else {
26908            Bytes::new(__input)
26909        };
26910        let mut __struct = Self::default();
26911        __struct.time_boot_ms = buf.get_u32_le()?;
26912        __struct.xacc = buf.get_i16_le()?;
26913        __struct.yacc = buf.get_i16_le()?;
26914        __struct.zacc = buf.get_i16_le()?;
26915        __struct.xgyro = buf.get_i16_le()?;
26916        __struct.ygyro = buf.get_i16_le()?;
26917        __struct.zgyro = buf.get_i16_le()?;
26918        __struct.xmag = buf.get_i16_le()?;
26919        __struct.ymag = buf.get_i16_le()?;
26920        __struct.zmag = buf.get_i16_le()?;
26921        __struct.temperature = buf.get_i16_le()?;
26922        Ok(__struct)
26923    }
26924    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26925        let mut __tmp = BytesMut::new(bytes);
26926        #[allow(clippy::absurd_extreme_comparisons)]
26927        #[allow(unused_comparisons)]
26928        if __tmp.remaining() < Self::ENCODED_LEN {
26929            panic!(
26930                "buffer is too small (need {} bytes, but got {})",
26931                Self::ENCODED_LEN,
26932                __tmp.remaining(),
26933            )
26934        }
26935        __tmp.put_u32_le(self.time_boot_ms);
26936        __tmp.put_i16_le(self.xacc);
26937        __tmp.put_i16_le(self.yacc);
26938        __tmp.put_i16_le(self.zacc);
26939        __tmp.put_i16_le(self.xgyro);
26940        __tmp.put_i16_le(self.ygyro);
26941        __tmp.put_i16_le(self.zgyro);
26942        __tmp.put_i16_le(self.xmag);
26943        __tmp.put_i16_le(self.ymag);
26944        __tmp.put_i16_le(self.zmag);
26945        if matches!(version, MavlinkVersion::V2) {
26946            __tmp.put_i16_le(self.temperature);
26947            let len = __tmp.len();
26948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26949        } else {
26950            __tmp.len()
26951        }
26952    }
26953}
26954#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26955#[doc = ""]
26956#[doc = "ID: 116"]
26957#[derive(Debug, Clone, PartialEq)]
26958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26960#[cfg_attr(feature = "ts", derive(TS))]
26961#[cfg_attr(feature = "ts", ts(export))]
26962pub struct SCALED_IMU2_DATA {
26963    #[doc = "Timestamp (time since system boot)."]
26964    pub time_boot_ms: u32,
26965    #[doc = "X acceleration"]
26966    pub xacc: i16,
26967    #[doc = "Y acceleration"]
26968    pub yacc: i16,
26969    #[doc = "Z acceleration"]
26970    pub zacc: i16,
26971    #[doc = "Angular speed around X axis"]
26972    pub xgyro: i16,
26973    #[doc = "Angular speed around Y axis"]
26974    pub ygyro: i16,
26975    #[doc = "Angular speed around Z axis"]
26976    pub zgyro: i16,
26977    #[doc = "X Magnetic field"]
26978    pub xmag: i16,
26979    #[doc = "Y Magnetic field"]
26980    pub ymag: i16,
26981    #[doc = "Z Magnetic field"]
26982    pub zmag: i16,
26983    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26985    pub temperature: i16,
26986}
26987impl SCALED_IMU2_DATA {
26988    pub const ENCODED_LEN: usize = 24usize;
26989    pub const DEFAULT: Self = Self {
26990        time_boot_ms: 0_u32,
26991        xacc: 0_i16,
26992        yacc: 0_i16,
26993        zacc: 0_i16,
26994        xgyro: 0_i16,
26995        ygyro: 0_i16,
26996        zgyro: 0_i16,
26997        xmag: 0_i16,
26998        ymag: 0_i16,
26999        zmag: 0_i16,
27000        temperature: 0_i16,
27001    };
27002    #[cfg(feature = "arbitrary")]
27003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27004        use arbitrary::{Arbitrary, Unstructured};
27005        let mut buf = [0u8; 1024];
27006        rng.fill_bytes(&mut buf);
27007        let mut unstructured = Unstructured::new(&buf);
27008        Self::arbitrary(&mut unstructured).unwrap_or_default()
27009    }
27010}
27011impl Default for SCALED_IMU2_DATA {
27012    fn default() -> Self {
27013        Self::DEFAULT.clone()
27014    }
27015}
27016impl MessageData for SCALED_IMU2_DATA {
27017    type Message = MavMessage;
27018    const ID: u32 = 116u32;
27019    const NAME: &'static str = "SCALED_IMU2";
27020    const EXTRA_CRC: u8 = 76u8;
27021    const ENCODED_LEN: usize = 24usize;
27022    fn deser(
27023        _version: MavlinkVersion,
27024        __input: &[u8],
27025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27026        let avail_len = __input.len();
27027        let mut payload_buf = [0; Self::ENCODED_LEN];
27028        let mut buf = if avail_len < Self::ENCODED_LEN {
27029            payload_buf[0..avail_len].copy_from_slice(__input);
27030            Bytes::new(&payload_buf)
27031        } else {
27032            Bytes::new(__input)
27033        };
27034        let mut __struct = Self::default();
27035        __struct.time_boot_ms = buf.get_u32_le()?;
27036        __struct.xacc = buf.get_i16_le()?;
27037        __struct.yacc = buf.get_i16_le()?;
27038        __struct.zacc = buf.get_i16_le()?;
27039        __struct.xgyro = buf.get_i16_le()?;
27040        __struct.ygyro = buf.get_i16_le()?;
27041        __struct.zgyro = buf.get_i16_le()?;
27042        __struct.xmag = buf.get_i16_le()?;
27043        __struct.ymag = buf.get_i16_le()?;
27044        __struct.zmag = buf.get_i16_le()?;
27045        __struct.temperature = buf.get_i16_le()?;
27046        Ok(__struct)
27047    }
27048    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27049        let mut __tmp = BytesMut::new(bytes);
27050        #[allow(clippy::absurd_extreme_comparisons)]
27051        #[allow(unused_comparisons)]
27052        if __tmp.remaining() < Self::ENCODED_LEN {
27053            panic!(
27054                "buffer is too small (need {} bytes, but got {})",
27055                Self::ENCODED_LEN,
27056                __tmp.remaining(),
27057            )
27058        }
27059        __tmp.put_u32_le(self.time_boot_ms);
27060        __tmp.put_i16_le(self.xacc);
27061        __tmp.put_i16_le(self.yacc);
27062        __tmp.put_i16_le(self.zacc);
27063        __tmp.put_i16_le(self.xgyro);
27064        __tmp.put_i16_le(self.ygyro);
27065        __tmp.put_i16_le(self.zgyro);
27066        __tmp.put_i16_le(self.xmag);
27067        __tmp.put_i16_le(self.ymag);
27068        __tmp.put_i16_le(self.zmag);
27069        if matches!(version, MavlinkVersion::V2) {
27070            __tmp.put_i16_le(self.temperature);
27071            let len = __tmp.len();
27072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27073        } else {
27074            __tmp.len()
27075        }
27076    }
27077}
27078#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27079#[doc = ""]
27080#[doc = "ID: 129"]
27081#[derive(Debug, Clone, PartialEq)]
27082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27084#[cfg_attr(feature = "ts", derive(TS))]
27085#[cfg_attr(feature = "ts", ts(export))]
27086pub struct SCALED_IMU3_DATA {
27087    #[doc = "Timestamp (time since system boot)."]
27088    pub time_boot_ms: u32,
27089    #[doc = "X acceleration"]
27090    pub xacc: i16,
27091    #[doc = "Y acceleration"]
27092    pub yacc: i16,
27093    #[doc = "Z acceleration"]
27094    pub zacc: i16,
27095    #[doc = "Angular speed around X axis"]
27096    pub xgyro: i16,
27097    #[doc = "Angular speed around Y axis"]
27098    pub ygyro: i16,
27099    #[doc = "Angular speed around Z axis"]
27100    pub zgyro: i16,
27101    #[doc = "X Magnetic field"]
27102    pub xmag: i16,
27103    #[doc = "Y Magnetic field"]
27104    pub ymag: i16,
27105    #[doc = "Z Magnetic field"]
27106    pub zmag: i16,
27107    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27108    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27109    pub temperature: i16,
27110}
27111impl SCALED_IMU3_DATA {
27112    pub const ENCODED_LEN: usize = 24usize;
27113    pub const DEFAULT: Self = Self {
27114        time_boot_ms: 0_u32,
27115        xacc: 0_i16,
27116        yacc: 0_i16,
27117        zacc: 0_i16,
27118        xgyro: 0_i16,
27119        ygyro: 0_i16,
27120        zgyro: 0_i16,
27121        xmag: 0_i16,
27122        ymag: 0_i16,
27123        zmag: 0_i16,
27124        temperature: 0_i16,
27125    };
27126    #[cfg(feature = "arbitrary")]
27127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27128        use arbitrary::{Arbitrary, Unstructured};
27129        let mut buf = [0u8; 1024];
27130        rng.fill_bytes(&mut buf);
27131        let mut unstructured = Unstructured::new(&buf);
27132        Self::arbitrary(&mut unstructured).unwrap_or_default()
27133    }
27134}
27135impl Default for SCALED_IMU3_DATA {
27136    fn default() -> Self {
27137        Self::DEFAULT.clone()
27138    }
27139}
27140impl MessageData for SCALED_IMU3_DATA {
27141    type Message = MavMessage;
27142    const ID: u32 = 129u32;
27143    const NAME: &'static str = "SCALED_IMU3";
27144    const EXTRA_CRC: u8 = 46u8;
27145    const ENCODED_LEN: usize = 24usize;
27146    fn deser(
27147        _version: MavlinkVersion,
27148        __input: &[u8],
27149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27150        let avail_len = __input.len();
27151        let mut payload_buf = [0; Self::ENCODED_LEN];
27152        let mut buf = if avail_len < Self::ENCODED_LEN {
27153            payload_buf[0..avail_len].copy_from_slice(__input);
27154            Bytes::new(&payload_buf)
27155        } else {
27156            Bytes::new(__input)
27157        };
27158        let mut __struct = Self::default();
27159        __struct.time_boot_ms = buf.get_u32_le()?;
27160        __struct.xacc = buf.get_i16_le()?;
27161        __struct.yacc = buf.get_i16_le()?;
27162        __struct.zacc = buf.get_i16_le()?;
27163        __struct.xgyro = buf.get_i16_le()?;
27164        __struct.ygyro = buf.get_i16_le()?;
27165        __struct.zgyro = buf.get_i16_le()?;
27166        __struct.xmag = buf.get_i16_le()?;
27167        __struct.ymag = buf.get_i16_le()?;
27168        __struct.zmag = buf.get_i16_le()?;
27169        __struct.temperature = buf.get_i16_le()?;
27170        Ok(__struct)
27171    }
27172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27173        let mut __tmp = BytesMut::new(bytes);
27174        #[allow(clippy::absurd_extreme_comparisons)]
27175        #[allow(unused_comparisons)]
27176        if __tmp.remaining() < Self::ENCODED_LEN {
27177            panic!(
27178                "buffer is too small (need {} bytes, but got {})",
27179                Self::ENCODED_LEN,
27180                __tmp.remaining(),
27181            )
27182        }
27183        __tmp.put_u32_le(self.time_boot_ms);
27184        __tmp.put_i16_le(self.xacc);
27185        __tmp.put_i16_le(self.yacc);
27186        __tmp.put_i16_le(self.zacc);
27187        __tmp.put_i16_le(self.xgyro);
27188        __tmp.put_i16_le(self.ygyro);
27189        __tmp.put_i16_le(self.zgyro);
27190        __tmp.put_i16_le(self.xmag);
27191        __tmp.put_i16_le(self.ymag);
27192        __tmp.put_i16_le(self.zmag);
27193        if matches!(version, MavlinkVersion::V2) {
27194            __tmp.put_i16_le(self.temperature);
27195            let len = __tmp.len();
27196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27197        } else {
27198            __tmp.len()
27199        }
27200    }
27201}
27202#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27203#[doc = ""]
27204#[doc = "ID: 29"]
27205#[derive(Debug, Clone, PartialEq)]
27206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27208#[cfg_attr(feature = "ts", derive(TS))]
27209#[cfg_attr(feature = "ts", ts(export))]
27210pub struct SCALED_PRESSURE_DATA {
27211    #[doc = "Timestamp (time since system boot)."]
27212    pub time_boot_ms: u32,
27213    #[doc = "Absolute pressure"]
27214    pub press_abs: f32,
27215    #[doc = "Differential pressure 1"]
27216    pub press_diff: f32,
27217    #[doc = "Absolute pressure temperature"]
27218    pub temperature: i16,
27219    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27220    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27221    pub temperature_press_diff: i16,
27222}
27223impl SCALED_PRESSURE_DATA {
27224    pub const ENCODED_LEN: usize = 16usize;
27225    pub const DEFAULT: Self = Self {
27226        time_boot_ms: 0_u32,
27227        press_abs: 0.0_f32,
27228        press_diff: 0.0_f32,
27229        temperature: 0_i16,
27230        temperature_press_diff: 0_i16,
27231    };
27232    #[cfg(feature = "arbitrary")]
27233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27234        use arbitrary::{Arbitrary, Unstructured};
27235        let mut buf = [0u8; 1024];
27236        rng.fill_bytes(&mut buf);
27237        let mut unstructured = Unstructured::new(&buf);
27238        Self::arbitrary(&mut unstructured).unwrap_or_default()
27239    }
27240}
27241impl Default for SCALED_PRESSURE_DATA {
27242    fn default() -> Self {
27243        Self::DEFAULT.clone()
27244    }
27245}
27246impl MessageData for SCALED_PRESSURE_DATA {
27247    type Message = MavMessage;
27248    const ID: u32 = 29u32;
27249    const NAME: &'static str = "SCALED_PRESSURE";
27250    const EXTRA_CRC: u8 = 115u8;
27251    const ENCODED_LEN: usize = 16usize;
27252    fn deser(
27253        _version: MavlinkVersion,
27254        __input: &[u8],
27255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27256        let avail_len = __input.len();
27257        let mut payload_buf = [0; Self::ENCODED_LEN];
27258        let mut buf = if avail_len < Self::ENCODED_LEN {
27259            payload_buf[0..avail_len].copy_from_slice(__input);
27260            Bytes::new(&payload_buf)
27261        } else {
27262            Bytes::new(__input)
27263        };
27264        let mut __struct = Self::default();
27265        __struct.time_boot_ms = buf.get_u32_le()?;
27266        __struct.press_abs = buf.get_f32_le()?;
27267        __struct.press_diff = buf.get_f32_le()?;
27268        __struct.temperature = buf.get_i16_le()?;
27269        __struct.temperature_press_diff = buf.get_i16_le()?;
27270        Ok(__struct)
27271    }
27272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27273        let mut __tmp = BytesMut::new(bytes);
27274        #[allow(clippy::absurd_extreme_comparisons)]
27275        #[allow(unused_comparisons)]
27276        if __tmp.remaining() < Self::ENCODED_LEN {
27277            panic!(
27278                "buffer is too small (need {} bytes, but got {})",
27279                Self::ENCODED_LEN,
27280                __tmp.remaining(),
27281            )
27282        }
27283        __tmp.put_u32_le(self.time_boot_ms);
27284        __tmp.put_f32_le(self.press_abs);
27285        __tmp.put_f32_le(self.press_diff);
27286        __tmp.put_i16_le(self.temperature);
27287        if matches!(version, MavlinkVersion::V2) {
27288            __tmp.put_i16_le(self.temperature_press_diff);
27289            let len = __tmp.len();
27290            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27291        } else {
27292            __tmp.len()
27293        }
27294    }
27295}
27296#[doc = "Barometer readings for 2nd barometer."]
27297#[doc = ""]
27298#[doc = "ID: 137"]
27299#[derive(Debug, Clone, PartialEq)]
27300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27302#[cfg_attr(feature = "ts", derive(TS))]
27303#[cfg_attr(feature = "ts", ts(export))]
27304pub struct SCALED_PRESSURE2_DATA {
27305    #[doc = "Timestamp (time since system boot)."]
27306    pub time_boot_ms: u32,
27307    #[doc = "Absolute pressure"]
27308    pub press_abs: f32,
27309    #[doc = "Differential pressure"]
27310    pub press_diff: f32,
27311    #[doc = "Absolute pressure temperature"]
27312    pub temperature: i16,
27313    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27315    pub temperature_press_diff: i16,
27316}
27317impl SCALED_PRESSURE2_DATA {
27318    pub const ENCODED_LEN: usize = 16usize;
27319    pub const DEFAULT: Self = Self {
27320        time_boot_ms: 0_u32,
27321        press_abs: 0.0_f32,
27322        press_diff: 0.0_f32,
27323        temperature: 0_i16,
27324        temperature_press_diff: 0_i16,
27325    };
27326    #[cfg(feature = "arbitrary")]
27327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27328        use arbitrary::{Arbitrary, Unstructured};
27329        let mut buf = [0u8; 1024];
27330        rng.fill_bytes(&mut buf);
27331        let mut unstructured = Unstructured::new(&buf);
27332        Self::arbitrary(&mut unstructured).unwrap_or_default()
27333    }
27334}
27335impl Default for SCALED_PRESSURE2_DATA {
27336    fn default() -> Self {
27337        Self::DEFAULT.clone()
27338    }
27339}
27340impl MessageData for SCALED_PRESSURE2_DATA {
27341    type Message = MavMessage;
27342    const ID: u32 = 137u32;
27343    const NAME: &'static str = "SCALED_PRESSURE2";
27344    const EXTRA_CRC: u8 = 195u8;
27345    const ENCODED_LEN: usize = 16usize;
27346    fn deser(
27347        _version: MavlinkVersion,
27348        __input: &[u8],
27349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27350        let avail_len = __input.len();
27351        let mut payload_buf = [0; Self::ENCODED_LEN];
27352        let mut buf = if avail_len < Self::ENCODED_LEN {
27353            payload_buf[0..avail_len].copy_from_slice(__input);
27354            Bytes::new(&payload_buf)
27355        } else {
27356            Bytes::new(__input)
27357        };
27358        let mut __struct = Self::default();
27359        __struct.time_boot_ms = buf.get_u32_le()?;
27360        __struct.press_abs = buf.get_f32_le()?;
27361        __struct.press_diff = buf.get_f32_le()?;
27362        __struct.temperature = buf.get_i16_le()?;
27363        __struct.temperature_press_diff = buf.get_i16_le()?;
27364        Ok(__struct)
27365    }
27366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27367        let mut __tmp = BytesMut::new(bytes);
27368        #[allow(clippy::absurd_extreme_comparisons)]
27369        #[allow(unused_comparisons)]
27370        if __tmp.remaining() < Self::ENCODED_LEN {
27371            panic!(
27372                "buffer is too small (need {} bytes, but got {})",
27373                Self::ENCODED_LEN,
27374                __tmp.remaining(),
27375            )
27376        }
27377        __tmp.put_u32_le(self.time_boot_ms);
27378        __tmp.put_f32_le(self.press_abs);
27379        __tmp.put_f32_le(self.press_diff);
27380        __tmp.put_i16_le(self.temperature);
27381        if matches!(version, MavlinkVersion::V2) {
27382            __tmp.put_i16_le(self.temperature_press_diff);
27383            let len = __tmp.len();
27384            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27385        } else {
27386            __tmp.len()
27387        }
27388    }
27389}
27390#[doc = "Barometer readings for 3rd barometer."]
27391#[doc = ""]
27392#[doc = "ID: 143"]
27393#[derive(Debug, Clone, PartialEq)]
27394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27396#[cfg_attr(feature = "ts", derive(TS))]
27397#[cfg_attr(feature = "ts", ts(export))]
27398pub struct SCALED_PRESSURE3_DATA {
27399    #[doc = "Timestamp (time since system boot)."]
27400    pub time_boot_ms: u32,
27401    #[doc = "Absolute pressure"]
27402    pub press_abs: f32,
27403    #[doc = "Differential pressure"]
27404    pub press_diff: f32,
27405    #[doc = "Absolute pressure temperature"]
27406    pub temperature: i16,
27407    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27408    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27409    pub temperature_press_diff: i16,
27410}
27411impl SCALED_PRESSURE3_DATA {
27412    pub const ENCODED_LEN: usize = 16usize;
27413    pub const DEFAULT: Self = Self {
27414        time_boot_ms: 0_u32,
27415        press_abs: 0.0_f32,
27416        press_diff: 0.0_f32,
27417        temperature: 0_i16,
27418        temperature_press_diff: 0_i16,
27419    };
27420    #[cfg(feature = "arbitrary")]
27421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27422        use arbitrary::{Arbitrary, Unstructured};
27423        let mut buf = [0u8; 1024];
27424        rng.fill_bytes(&mut buf);
27425        let mut unstructured = Unstructured::new(&buf);
27426        Self::arbitrary(&mut unstructured).unwrap_or_default()
27427    }
27428}
27429impl Default for SCALED_PRESSURE3_DATA {
27430    fn default() -> Self {
27431        Self::DEFAULT.clone()
27432    }
27433}
27434impl MessageData for SCALED_PRESSURE3_DATA {
27435    type Message = MavMessage;
27436    const ID: u32 = 143u32;
27437    const NAME: &'static str = "SCALED_PRESSURE3";
27438    const EXTRA_CRC: u8 = 131u8;
27439    const ENCODED_LEN: usize = 16usize;
27440    fn deser(
27441        _version: MavlinkVersion,
27442        __input: &[u8],
27443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27444        let avail_len = __input.len();
27445        let mut payload_buf = [0; Self::ENCODED_LEN];
27446        let mut buf = if avail_len < Self::ENCODED_LEN {
27447            payload_buf[0..avail_len].copy_from_slice(__input);
27448            Bytes::new(&payload_buf)
27449        } else {
27450            Bytes::new(__input)
27451        };
27452        let mut __struct = Self::default();
27453        __struct.time_boot_ms = buf.get_u32_le()?;
27454        __struct.press_abs = buf.get_f32_le()?;
27455        __struct.press_diff = buf.get_f32_le()?;
27456        __struct.temperature = buf.get_i16_le()?;
27457        __struct.temperature_press_diff = buf.get_i16_le()?;
27458        Ok(__struct)
27459    }
27460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27461        let mut __tmp = BytesMut::new(bytes);
27462        #[allow(clippy::absurd_extreme_comparisons)]
27463        #[allow(unused_comparisons)]
27464        if __tmp.remaining() < Self::ENCODED_LEN {
27465            panic!(
27466                "buffer is too small (need {} bytes, but got {})",
27467                Self::ENCODED_LEN,
27468                __tmp.remaining(),
27469            )
27470        }
27471        __tmp.put_u32_le(self.time_boot_ms);
27472        __tmp.put_f32_le(self.press_abs);
27473        __tmp.put_f32_le(self.press_diff);
27474        __tmp.put_i16_le(self.temperature);
27475        if matches!(version, MavlinkVersion::V2) {
27476            __tmp.put_i16_le(self.temperature_press_diff);
27477            let len = __tmp.len();
27478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27479        } else {
27480            __tmp.len()
27481        }
27482    }
27483}
27484#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27485#[doc = ""]
27486#[doc = "ID: 126"]
27487#[derive(Debug, Clone, PartialEq)]
27488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27490#[cfg_attr(feature = "ts", derive(TS))]
27491#[cfg_attr(feature = "ts", ts(export))]
27492pub struct SERIAL_CONTROL_DATA {
27493    #[doc = "Baudrate of transfer. Zero means no change."]
27494    pub baudrate: u32,
27495    #[doc = "Timeout for reply data"]
27496    pub timeout: u16,
27497    #[doc = "Serial control device type."]
27498    pub device: SerialControlDev,
27499    #[doc = "Bitmap of serial control flags."]
27500    pub flags: SerialControlFlag,
27501    #[doc = "how many bytes in this transfer"]
27502    pub count: u8,
27503    #[doc = "serial data"]
27504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27505    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27506    pub data: [u8; 70],
27507    #[doc = "System ID"]
27508    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27509    pub target_system: u8,
27510    #[doc = "Component ID"]
27511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27512    pub target_component: u8,
27513}
27514impl SERIAL_CONTROL_DATA {
27515    pub const ENCODED_LEN: usize = 81usize;
27516    pub const DEFAULT: Self = Self {
27517        baudrate: 0_u32,
27518        timeout: 0_u16,
27519        device: SerialControlDev::DEFAULT,
27520        flags: SerialControlFlag::DEFAULT,
27521        count: 0_u8,
27522        data: [0_u8; 70usize],
27523        target_system: 0_u8,
27524        target_component: 0_u8,
27525    };
27526    #[cfg(feature = "arbitrary")]
27527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27528        use arbitrary::{Arbitrary, Unstructured};
27529        let mut buf = [0u8; 1024];
27530        rng.fill_bytes(&mut buf);
27531        let mut unstructured = Unstructured::new(&buf);
27532        Self::arbitrary(&mut unstructured).unwrap_or_default()
27533    }
27534}
27535impl Default for SERIAL_CONTROL_DATA {
27536    fn default() -> Self {
27537        Self::DEFAULT.clone()
27538    }
27539}
27540impl MessageData for SERIAL_CONTROL_DATA {
27541    type Message = MavMessage;
27542    const ID: u32 = 126u32;
27543    const NAME: &'static str = "SERIAL_CONTROL";
27544    const EXTRA_CRC: u8 = 220u8;
27545    const ENCODED_LEN: usize = 81usize;
27546    fn deser(
27547        _version: MavlinkVersion,
27548        __input: &[u8],
27549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27550        let avail_len = __input.len();
27551        let mut payload_buf = [0; Self::ENCODED_LEN];
27552        let mut buf = if avail_len < Self::ENCODED_LEN {
27553            payload_buf[0..avail_len].copy_from_slice(__input);
27554            Bytes::new(&payload_buf)
27555        } else {
27556            Bytes::new(__input)
27557        };
27558        let mut __struct = Self::default();
27559        __struct.baudrate = buf.get_u32_le()?;
27560        __struct.timeout = buf.get_u16_le()?;
27561        let tmp = buf.get_u8()?;
27562        __struct.device =
27563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27564                enum_type: "SerialControlDev",
27565                value: tmp as u64,
27566            })?;
27567        let tmp = buf.get_u8()?;
27568        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27569            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27570                flag_type: "SerialControlFlag",
27571                value: tmp as u64,
27572            })?;
27573        __struct.count = buf.get_u8()?;
27574        for v in &mut __struct.data {
27575            let val = buf.get_u8()?;
27576            *v = val;
27577        }
27578        __struct.target_system = buf.get_u8()?;
27579        __struct.target_component = buf.get_u8()?;
27580        Ok(__struct)
27581    }
27582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27583        let mut __tmp = BytesMut::new(bytes);
27584        #[allow(clippy::absurd_extreme_comparisons)]
27585        #[allow(unused_comparisons)]
27586        if __tmp.remaining() < Self::ENCODED_LEN {
27587            panic!(
27588                "buffer is too small (need {} bytes, but got {})",
27589                Self::ENCODED_LEN,
27590                __tmp.remaining(),
27591            )
27592        }
27593        __tmp.put_u32_le(self.baudrate);
27594        __tmp.put_u16_le(self.timeout);
27595        __tmp.put_u8(self.device as u8);
27596        __tmp.put_u8(self.flags.bits() as u8);
27597        __tmp.put_u8(self.count);
27598        for val in &self.data {
27599            __tmp.put_u8(*val);
27600        }
27601        if matches!(version, MavlinkVersion::V2) {
27602            __tmp.put_u8(self.target_system);
27603            __tmp.put_u8(self.target_component);
27604            let len = __tmp.len();
27605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27606        } else {
27607            __tmp.len()
27608        }
27609    }
27610}
27611#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27612#[doc = ""]
27613#[doc = "ID: 36"]
27614#[derive(Debug, Clone, PartialEq)]
27615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27617#[cfg_attr(feature = "ts", derive(TS))]
27618#[cfg_attr(feature = "ts", ts(export))]
27619pub struct SERVO_OUTPUT_RAW_DATA {
27620    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27621    pub time_usec: u32,
27622    #[doc = "Servo output 1 value"]
27623    pub servo1_raw: u16,
27624    #[doc = "Servo output 2 value"]
27625    pub servo2_raw: u16,
27626    #[doc = "Servo output 3 value"]
27627    pub servo3_raw: u16,
27628    #[doc = "Servo output 4 value"]
27629    pub servo4_raw: u16,
27630    #[doc = "Servo output 5 value"]
27631    pub servo5_raw: u16,
27632    #[doc = "Servo output 6 value"]
27633    pub servo6_raw: u16,
27634    #[doc = "Servo output 7 value"]
27635    pub servo7_raw: u16,
27636    #[doc = "Servo output 8 value"]
27637    pub servo8_raw: u16,
27638    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27639    pub port: u8,
27640    #[doc = "Servo output 9 value"]
27641    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27642    pub servo9_raw: u16,
27643    #[doc = "Servo output 10 value"]
27644    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27645    pub servo10_raw: u16,
27646    #[doc = "Servo output 11 value"]
27647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27648    pub servo11_raw: u16,
27649    #[doc = "Servo output 12 value"]
27650    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27651    pub servo12_raw: u16,
27652    #[doc = "Servo output 13 value"]
27653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27654    pub servo13_raw: u16,
27655    #[doc = "Servo output 14 value"]
27656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27657    pub servo14_raw: u16,
27658    #[doc = "Servo output 15 value"]
27659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27660    pub servo15_raw: u16,
27661    #[doc = "Servo output 16 value"]
27662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27663    pub servo16_raw: u16,
27664}
27665impl SERVO_OUTPUT_RAW_DATA {
27666    pub const ENCODED_LEN: usize = 37usize;
27667    pub const DEFAULT: Self = Self {
27668        time_usec: 0_u32,
27669        servo1_raw: 0_u16,
27670        servo2_raw: 0_u16,
27671        servo3_raw: 0_u16,
27672        servo4_raw: 0_u16,
27673        servo5_raw: 0_u16,
27674        servo6_raw: 0_u16,
27675        servo7_raw: 0_u16,
27676        servo8_raw: 0_u16,
27677        port: 0_u8,
27678        servo9_raw: 0_u16,
27679        servo10_raw: 0_u16,
27680        servo11_raw: 0_u16,
27681        servo12_raw: 0_u16,
27682        servo13_raw: 0_u16,
27683        servo14_raw: 0_u16,
27684        servo15_raw: 0_u16,
27685        servo16_raw: 0_u16,
27686    };
27687    #[cfg(feature = "arbitrary")]
27688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27689        use arbitrary::{Arbitrary, Unstructured};
27690        let mut buf = [0u8; 1024];
27691        rng.fill_bytes(&mut buf);
27692        let mut unstructured = Unstructured::new(&buf);
27693        Self::arbitrary(&mut unstructured).unwrap_or_default()
27694    }
27695}
27696impl Default for SERVO_OUTPUT_RAW_DATA {
27697    fn default() -> Self {
27698        Self::DEFAULT.clone()
27699    }
27700}
27701impl MessageData for SERVO_OUTPUT_RAW_DATA {
27702    type Message = MavMessage;
27703    const ID: u32 = 36u32;
27704    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27705    const EXTRA_CRC: u8 = 222u8;
27706    const ENCODED_LEN: usize = 37usize;
27707    fn deser(
27708        _version: MavlinkVersion,
27709        __input: &[u8],
27710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27711        let avail_len = __input.len();
27712        let mut payload_buf = [0; Self::ENCODED_LEN];
27713        let mut buf = if avail_len < Self::ENCODED_LEN {
27714            payload_buf[0..avail_len].copy_from_slice(__input);
27715            Bytes::new(&payload_buf)
27716        } else {
27717            Bytes::new(__input)
27718        };
27719        let mut __struct = Self::default();
27720        __struct.time_usec = buf.get_u32_le()?;
27721        __struct.servo1_raw = buf.get_u16_le()?;
27722        __struct.servo2_raw = buf.get_u16_le()?;
27723        __struct.servo3_raw = buf.get_u16_le()?;
27724        __struct.servo4_raw = buf.get_u16_le()?;
27725        __struct.servo5_raw = buf.get_u16_le()?;
27726        __struct.servo6_raw = buf.get_u16_le()?;
27727        __struct.servo7_raw = buf.get_u16_le()?;
27728        __struct.servo8_raw = buf.get_u16_le()?;
27729        __struct.port = buf.get_u8()?;
27730        __struct.servo9_raw = buf.get_u16_le()?;
27731        __struct.servo10_raw = buf.get_u16_le()?;
27732        __struct.servo11_raw = buf.get_u16_le()?;
27733        __struct.servo12_raw = buf.get_u16_le()?;
27734        __struct.servo13_raw = buf.get_u16_le()?;
27735        __struct.servo14_raw = buf.get_u16_le()?;
27736        __struct.servo15_raw = buf.get_u16_le()?;
27737        __struct.servo16_raw = buf.get_u16_le()?;
27738        Ok(__struct)
27739    }
27740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27741        let mut __tmp = BytesMut::new(bytes);
27742        #[allow(clippy::absurd_extreme_comparisons)]
27743        #[allow(unused_comparisons)]
27744        if __tmp.remaining() < Self::ENCODED_LEN {
27745            panic!(
27746                "buffer is too small (need {} bytes, but got {})",
27747                Self::ENCODED_LEN,
27748                __tmp.remaining(),
27749            )
27750        }
27751        __tmp.put_u32_le(self.time_usec);
27752        __tmp.put_u16_le(self.servo1_raw);
27753        __tmp.put_u16_le(self.servo2_raw);
27754        __tmp.put_u16_le(self.servo3_raw);
27755        __tmp.put_u16_le(self.servo4_raw);
27756        __tmp.put_u16_le(self.servo5_raw);
27757        __tmp.put_u16_le(self.servo6_raw);
27758        __tmp.put_u16_le(self.servo7_raw);
27759        __tmp.put_u16_le(self.servo8_raw);
27760        __tmp.put_u8(self.port);
27761        if matches!(version, MavlinkVersion::V2) {
27762            __tmp.put_u16_le(self.servo9_raw);
27763            __tmp.put_u16_le(self.servo10_raw);
27764            __tmp.put_u16_le(self.servo11_raw);
27765            __tmp.put_u16_le(self.servo12_raw);
27766            __tmp.put_u16_le(self.servo13_raw);
27767            __tmp.put_u16_le(self.servo14_raw);
27768            __tmp.put_u16_le(self.servo15_raw);
27769            __tmp.put_u16_le(self.servo16_raw);
27770            let len = __tmp.len();
27771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27772        } else {
27773            __tmp.len()
27774        }
27775    }
27776}
27777#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27778#[doc = ""]
27779#[doc = "ID: 256"]
27780#[derive(Debug, Clone, PartialEq)]
27781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27783#[cfg_attr(feature = "ts", derive(TS))]
27784#[cfg_attr(feature = "ts", ts(export))]
27785pub struct SETUP_SIGNING_DATA {
27786    #[doc = "initial timestamp"]
27787    pub initial_timestamp: u64,
27788    #[doc = "system id of the target"]
27789    pub target_system: u8,
27790    #[doc = "component ID of the target"]
27791    pub target_component: u8,
27792    #[doc = "signing key"]
27793    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27794    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27795    pub secret_key: [u8; 32],
27796}
27797impl SETUP_SIGNING_DATA {
27798    pub const ENCODED_LEN: usize = 42usize;
27799    pub const DEFAULT: Self = Self {
27800        initial_timestamp: 0_u64,
27801        target_system: 0_u8,
27802        target_component: 0_u8,
27803        secret_key: [0_u8; 32usize],
27804    };
27805    #[cfg(feature = "arbitrary")]
27806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27807        use arbitrary::{Arbitrary, Unstructured};
27808        let mut buf = [0u8; 1024];
27809        rng.fill_bytes(&mut buf);
27810        let mut unstructured = Unstructured::new(&buf);
27811        Self::arbitrary(&mut unstructured).unwrap_or_default()
27812    }
27813}
27814impl Default for SETUP_SIGNING_DATA {
27815    fn default() -> Self {
27816        Self::DEFAULT.clone()
27817    }
27818}
27819impl MessageData for SETUP_SIGNING_DATA {
27820    type Message = MavMessage;
27821    const ID: u32 = 256u32;
27822    const NAME: &'static str = "SETUP_SIGNING";
27823    const EXTRA_CRC: u8 = 71u8;
27824    const ENCODED_LEN: usize = 42usize;
27825    fn deser(
27826        _version: MavlinkVersion,
27827        __input: &[u8],
27828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27829        let avail_len = __input.len();
27830        let mut payload_buf = [0; Self::ENCODED_LEN];
27831        let mut buf = if avail_len < Self::ENCODED_LEN {
27832            payload_buf[0..avail_len].copy_from_slice(__input);
27833            Bytes::new(&payload_buf)
27834        } else {
27835            Bytes::new(__input)
27836        };
27837        let mut __struct = Self::default();
27838        __struct.initial_timestamp = buf.get_u64_le()?;
27839        __struct.target_system = buf.get_u8()?;
27840        __struct.target_component = buf.get_u8()?;
27841        for v in &mut __struct.secret_key {
27842            let val = buf.get_u8()?;
27843            *v = val;
27844        }
27845        Ok(__struct)
27846    }
27847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27848        let mut __tmp = BytesMut::new(bytes);
27849        #[allow(clippy::absurd_extreme_comparisons)]
27850        #[allow(unused_comparisons)]
27851        if __tmp.remaining() < Self::ENCODED_LEN {
27852            panic!(
27853                "buffer is too small (need {} bytes, but got {})",
27854                Self::ENCODED_LEN,
27855                __tmp.remaining(),
27856            )
27857        }
27858        __tmp.put_u64_le(self.initial_timestamp);
27859        __tmp.put_u8(self.target_system);
27860        __tmp.put_u8(self.target_component);
27861        for val in &self.secret_key {
27862            __tmp.put_u8(*val);
27863        }
27864        if matches!(version, MavlinkVersion::V2) {
27865            let len = __tmp.len();
27866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27867        } else {
27868            __tmp.len()
27869        }
27870    }
27871}
27872#[doc = "Set the vehicle attitude and body angular rates."]
27873#[doc = ""]
27874#[doc = "ID: 139"]
27875#[derive(Debug, Clone, PartialEq)]
27876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27878#[cfg_attr(feature = "ts", derive(TS))]
27879#[cfg_attr(feature = "ts", ts(export))]
27880pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27881    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27882    pub time_usec: u64,
27883    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27885    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27886    pub controls: [f32; 8],
27887    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27888    pub group_mlx: u8,
27889    #[doc = "System ID"]
27890    pub target_system: u8,
27891    #[doc = "Component ID"]
27892    pub target_component: u8,
27893}
27894impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27895    pub const ENCODED_LEN: usize = 43usize;
27896    pub const DEFAULT: Self = Self {
27897        time_usec: 0_u64,
27898        controls: [0.0_f32; 8usize],
27899        group_mlx: 0_u8,
27900        target_system: 0_u8,
27901        target_component: 0_u8,
27902    };
27903    #[cfg(feature = "arbitrary")]
27904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27905        use arbitrary::{Arbitrary, Unstructured};
27906        let mut buf = [0u8; 1024];
27907        rng.fill_bytes(&mut buf);
27908        let mut unstructured = Unstructured::new(&buf);
27909        Self::arbitrary(&mut unstructured).unwrap_or_default()
27910    }
27911}
27912impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27913    fn default() -> Self {
27914        Self::DEFAULT.clone()
27915    }
27916}
27917impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27918    type Message = MavMessage;
27919    const ID: u32 = 139u32;
27920    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27921    const EXTRA_CRC: u8 = 168u8;
27922    const ENCODED_LEN: usize = 43usize;
27923    fn deser(
27924        _version: MavlinkVersion,
27925        __input: &[u8],
27926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27927        let avail_len = __input.len();
27928        let mut payload_buf = [0; Self::ENCODED_LEN];
27929        let mut buf = if avail_len < Self::ENCODED_LEN {
27930            payload_buf[0..avail_len].copy_from_slice(__input);
27931            Bytes::new(&payload_buf)
27932        } else {
27933            Bytes::new(__input)
27934        };
27935        let mut __struct = Self::default();
27936        __struct.time_usec = buf.get_u64_le()?;
27937        for v in &mut __struct.controls {
27938            let val = buf.get_f32_le()?;
27939            *v = val;
27940        }
27941        __struct.group_mlx = buf.get_u8()?;
27942        __struct.target_system = buf.get_u8()?;
27943        __struct.target_component = buf.get_u8()?;
27944        Ok(__struct)
27945    }
27946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27947        let mut __tmp = BytesMut::new(bytes);
27948        #[allow(clippy::absurd_extreme_comparisons)]
27949        #[allow(unused_comparisons)]
27950        if __tmp.remaining() < Self::ENCODED_LEN {
27951            panic!(
27952                "buffer is too small (need {} bytes, but got {})",
27953                Self::ENCODED_LEN,
27954                __tmp.remaining(),
27955            )
27956        }
27957        __tmp.put_u64_le(self.time_usec);
27958        for val in &self.controls {
27959            __tmp.put_f32_le(*val);
27960        }
27961        __tmp.put_u8(self.group_mlx);
27962        __tmp.put_u8(self.target_system);
27963        __tmp.put_u8(self.target_component);
27964        if matches!(version, MavlinkVersion::V2) {
27965            let len = __tmp.len();
27966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27967        } else {
27968            __tmp.len()
27969        }
27970    }
27971}
27972#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27973#[doc = ""]
27974#[doc = "ID: 82"]
27975#[derive(Debug, Clone, PartialEq)]
27976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27978#[cfg_attr(feature = "ts", derive(TS))]
27979#[cfg_attr(feature = "ts", ts(export))]
27980pub struct SET_ATTITUDE_TARGET_DATA {
27981    #[doc = "Timestamp (time since system boot)."]
27982    pub time_boot_ms: u32,
27983    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27986    pub q: [f32; 4],
27987    #[doc = "Body roll rate"]
27988    pub body_roll_rate: f32,
27989    #[doc = "Body pitch rate"]
27990    pub body_pitch_rate: f32,
27991    #[doc = "Body yaw rate"]
27992    pub body_yaw_rate: f32,
27993    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27994    pub thrust: f32,
27995    #[doc = "System ID"]
27996    pub target_system: u8,
27997    #[doc = "Component ID"]
27998    pub target_component: u8,
27999    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28000    pub type_mask: AttitudeTargetTypemask,
28001    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28002    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28004    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28005    pub thrust_body: [f32; 3],
28006}
28007impl SET_ATTITUDE_TARGET_DATA {
28008    pub const ENCODED_LEN: usize = 51usize;
28009    pub const DEFAULT: Self = Self {
28010        time_boot_ms: 0_u32,
28011        q: [0.0_f32; 4usize],
28012        body_roll_rate: 0.0_f32,
28013        body_pitch_rate: 0.0_f32,
28014        body_yaw_rate: 0.0_f32,
28015        thrust: 0.0_f32,
28016        target_system: 0_u8,
28017        target_component: 0_u8,
28018        type_mask: AttitudeTargetTypemask::DEFAULT,
28019        thrust_body: [0.0_f32; 3usize],
28020    };
28021    #[cfg(feature = "arbitrary")]
28022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28023        use arbitrary::{Arbitrary, Unstructured};
28024        let mut buf = [0u8; 1024];
28025        rng.fill_bytes(&mut buf);
28026        let mut unstructured = Unstructured::new(&buf);
28027        Self::arbitrary(&mut unstructured).unwrap_or_default()
28028    }
28029}
28030impl Default for SET_ATTITUDE_TARGET_DATA {
28031    fn default() -> Self {
28032        Self::DEFAULT.clone()
28033    }
28034}
28035impl MessageData for SET_ATTITUDE_TARGET_DATA {
28036    type Message = MavMessage;
28037    const ID: u32 = 82u32;
28038    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28039    const EXTRA_CRC: u8 = 49u8;
28040    const ENCODED_LEN: usize = 51usize;
28041    fn deser(
28042        _version: MavlinkVersion,
28043        __input: &[u8],
28044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28045        let avail_len = __input.len();
28046        let mut payload_buf = [0; Self::ENCODED_LEN];
28047        let mut buf = if avail_len < Self::ENCODED_LEN {
28048            payload_buf[0..avail_len].copy_from_slice(__input);
28049            Bytes::new(&payload_buf)
28050        } else {
28051            Bytes::new(__input)
28052        };
28053        let mut __struct = Self::default();
28054        __struct.time_boot_ms = buf.get_u32_le()?;
28055        for v in &mut __struct.q {
28056            let val = buf.get_f32_le()?;
28057            *v = val;
28058        }
28059        __struct.body_roll_rate = buf.get_f32_le()?;
28060        __struct.body_pitch_rate = buf.get_f32_le()?;
28061        __struct.body_yaw_rate = buf.get_f32_le()?;
28062        __struct.thrust = buf.get_f32_le()?;
28063        __struct.target_system = buf.get_u8()?;
28064        __struct.target_component = buf.get_u8()?;
28065        let tmp = buf.get_u8()?;
28066        __struct.type_mask =
28067            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28068                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28069                    flag_type: "AttitudeTargetTypemask",
28070                    value: tmp as u64,
28071                })?;
28072        for v in &mut __struct.thrust_body {
28073            let val = buf.get_f32_le()?;
28074            *v = val;
28075        }
28076        Ok(__struct)
28077    }
28078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28079        let mut __tmp = BytesMut::new(bytes);
28080        #[allow(clippy::absurd_extreme_comparisons)]
28081        #[allow(unused_comparisons)]
28082        if __tmp.remaining() < Self::ENCODED_LEN {
28083            panic!(
28084                "buffer is too small (need {} bytes, but got {})",
28085                Self::ENCODED_LEN,
28086                __tmp.remaining(),
28087            )
28088        }
28089        __tmp.put_u32_le(self.time_boot_ms);
28090        for val in &self.q {
28091            __tmp.put_f32_le(*val);
28092        }
28093        __tmp.put_f32_le(self.body_roll_rate);
28094        __tmp.put_f32_le(self.body_pitch_rate);
28095        __tmp.put_f32_le(self.body_yaw_rate);
28096        __tmp.put_f32_le(self.thrust);
28097        __tmp.put_u8(self.target_system);
28098        __tmp.put_u8(self.target_component);
28099        __tmp.put_u8(self.type_mask.bits() as u8);
28100        if matches!(version, MavlinkVersion::V2) {
28101            for val in &self.thrust_body {
28102                __tmp.put_f32_le(*val);
28103            }
28104            let len = __tmp.len();
28105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28106        } else {
28107            __tmp.len()
28108        }
28109    }
28110}
28111#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28112#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28113#[doc = ""]
28114#[doc = "ID: 48"]
28115#[derive(Debug, Clone, PartialEq)]
28116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28118#[cfg_attr(feature = "ts", derive(TS))]
28119#[cfg_attr(feature = "ts", ts(export))]
28120pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28121    #[doc = "Latitude (WGS84)"]
28122    pub latitude: i32,
28123    #[doc = "Longitude (WGS84)"]
28124    pub longitude: i32,
28125    #[doc = "Altitude (MSL). Positive for up."]
28126    pub altitude: i32,
28127    #[doc = "System ID"]
28128    pub target_system: u8,
28129    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28131    pub time_usec: u64,
28132}
28133impl SET_GPS_GLOBAL_ORIGIN_DATA {
28134    pub const ENCODED_LEN: usize = 21usize;
28135    pub const DEFAULT: Self = Self {
28136        latitude: 0_i32,
28137        longitude: 0_i32,
28138        altitude: 0_i32,
28139        target_system: 0_u8,
28140        time_usec: 0_u64,
28141    };
28142    #[cfg(feature = "arbitrary")]
28143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28144        use arbitrary::{Arbitrary, Unstructured};
28145        let mut buf = [0u8; 1024];
28146        rng.fill_bytes(&mut buf);
28147        let mut unstructured = Unstructured::new(&buf);
28148        Self::arbitrary(&mut unstructured).unwrap_or_default()
28149    }
28150}
28151impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28152    fn default() -> Self {
28153        Self::DEFAULT.clone()
28154    }
28155}
28156impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28157    type Message = MavMessage;
28158    const ID: u32 = 48u32;
28159    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28160    const EXTRA_CRC: u8 = 41u8;
28161    const ENCODED_LEN: usize = 21usize;
28162    fn deser(
28163        _version: MavlinkVersion,
28164        __input: &[u8],
28165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28166        let avail_len = __input.len();
28167        let mut payload_buf = [0; Self::ENCODED_LEN];
28168        let mut buf = if avail_len < Self::ENCODED_LEN {
28169            payload_buf[0..avail_len].copy_from_slice(__input);
28170            Bytes::new(&payload_buf)
28171        } else {
28172            Bytes::new(__input)
28173        };
28174        let mut __struct = Self::default();
28175        __struct.latitude = buf.get_i32_le()?;
28176        __struct.longitude = buf.get_i32_le()?;
28177        __struct.altitude = buf.get_i32_le()?;
28178        __struct.target_system = buf.get_u8()?;
28179        __struct.time_usec = buf.get_u64_le()?;
28180        Ok(__struct)
28181    }
28182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28183        let mut __tmp = BytesMut::new(bytes);
28184        #[allow(clippy::absurd_extreme_comparisons)]
28185        #[allow(unused_comparisons)]
28186        if __tmp.remaining() < Self::ENCODED_LEN {
28187            panic!(
28188                "buffer is too small (need {} bytes, but got {})",
28189                Self::ENCODED_LEN,
28190                __tmp.remaining(),
28191            )
28192        }
28193        __tmp.put_i32_le(self.latitude);
28194        __tmp.put_i32_le(self.longitude);
28195        __tmp.put_i32_le(self.altitude);
28196        __tmp.put_u8(self.target_system);
28197        if matches!(version, MavlinkVersion::V2) {
28198            __tmp.put_u64_le(self.time_usec);
28199            let len = __tmp.len();
28200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28201        } else {
28202            __tmp.len()
28203        }
28204    }
28205}
28206#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28207#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28208#[doc = ""]
28209#[doc = "ID: 243"]
28210#[derive(Debug, Clone, PartialEq)]
28211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28213#[cfg_attr(feature = "ts", derive(TS))]
28214#[cfg_attr(feature = "ts", ts(export))]
28215pub struct SET_HOME_POSITION_DATA {
28216    #[doc = "Latitude (WGS84)"]
28217    pub latitude: i32,
28218    #[doc = "Longitude (WGS84)"]
28219    pub longitude: i32,
28220    #[doc = "Altitude (MSL). Positive for up."]
28221    pub altitude: i32,
28222    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28223    pub x: f32,
28224    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28225    pub y: f32,
28226    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28227    pub z: f32,
28228    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28229    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28230    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28231    pub q: [f32; 4],
28232    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28233    pub approach_x: f32,
28234    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28235    pub approach_y: f32,
28236    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28237    pub approach_z: f32,
28238    #[doc = "System ID."]
28239    pub target_system: u8,
28240    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28241    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28242    pub time_usec: u64,
28243}
28244impl SET_HOME_POSITION_DATA {
28245    pub const ENCODED_LEN: usize = 61usize;
28246    pub const DEFAULT: Self = Self {
28247        latitude: 0_i32,
28248        longitude: 0_i32,
28249        altitude: 0_i32,
28250        x: 0.0_f32,
28251        y: 0.0_f32,
28252        z: 0.0_f32,
28253        q: [0.0_f32; 4usize],
28254        approach_x: 0.0_f32,
28255        approach_y: 0.0_f32,
28256        approach_z: 0.0_f32,
28257        target_system: 0_u8,
28258        time_usec: 0_u64,
28259    };
28260    #[cfg(feature = "arbitrary")]
28261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28262        use arbitrary::{Arbitrary, Unstructured};
28263        let mut buf = [0u8; 1024];
28264        rng.fill_bytes(&mut buf);
28265        let mut unstructured = Unstructured::new(&buf);
28266        Self::arbitrary(&mut unstructured).unwrap_or_default()
28267    }
28268}
28269impl Default for SET_HOME_POSITION_DATA {
28270    fn default() -> Self {
28271        Self::DEFAULT.clone()
28272    }
28273}
28274impl MessageData for SET_HOME_POSITION_DATA {
28275    type Message = MavMessage;
28276    const ID: u32 = 243u32;
28277    const NAME: &'static str = "SET_HOME_POSITION";
28278    const EXTRA_CRC: u8 = 85u8;
28279    const ENCODED_LEN: usize = 61usize;
28280    fn deser(
28281        _version: MavlinkVersion,
28282        __input: &[u8],
28283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28284        let avail_len = __input.len();
28285        let mut payload_buf = [0; Self::ENCODED_LEN];
28286        let mut buf = if avail_len < Self::ENCODED_LEN {
28287            payload_buf[0..avail_len].copy_from_slice(__input);
28288            Bytes::new(&payload_buf)
28289        } else {
28290            Bytes::new(__input)
28291        };
28292        let mut __struct = Self::default();
28293        __struct.latitude = buf.get_i32_le()?;
28294        __struct.longitude = buf.get_i32_le()?;
28295        __struct.altitude = buf.get_i32_le()?;
28296        __struct.x = buf.get_f32_le()?;
28297        __struct.y = buf.get_f32_le()?;
28298        __struct.z = buf.get_f32_le()?;
28299        for v in &mut __struct.q {
28300            let val = buf.get_f32_le()?;
28301            *v = val;
28302        }
28303        __struct.approach_x = buf.get_f32_le()?;
28304        __struct.approach_y = buf.get_f32_le()?;
28305        __struct.approach_z = buf.get_f32_le()?;
28306        __struct.target_system = buf.get_u8()?;
28307        __struct.time_usec = buf.get_u64_le()?;
28308        Ok(__struct)
28309    }
28310    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28311        let mut __tmp = BytesMut::new(bytes);
28312        #[allow(clippy::absurd_extreme_comparisons)]
28313        #[allow(unused_comparisons)]
28314        if __tmp.remaining() < Self::ENCODED_LEN {
28315            panic!(
28316                "buffer is too small (need {} bytes, but got {})",
28317                Self::ENCODED_LEN,
28318                __tmp.remaining(),
28319            )
28320        }
28321        __tmp.put_i32_le(self.latitude);
28322        __tmp.put_i32_le(self.longitude);
28323        __tmp.put_i32_le(self.altitude);
28324        __tmp.put_f32_le(self.x);
28325        __tmp.put_f32_le(self.y);
28326        __tmp.put_f32_le(self.z);
28327        for val in &self.q {
28328            __tmp.put_f32_le(*val);
28329        }
28330        __tmp.put_f32_le(self.approach_x);
28331        __tmp.put_f32_le(self.approach_y);
28332        __tmp.put_f32_le(self.approach_z);
28333        __tmp.put_u8(self.target_system);
28334        if matches!(version, MavlinkVersion::V2) {
28335            __tmp.put_u64_le(self.time_usec);
28336            let len = __tmp.len();
28337            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28338        } else {
28339            __tmp.len()
28340        }
28341    }
28342}
28343#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28344#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28345#[doc = ""]
28346#[doc = "ID: 11"]
28347#[derive(Debug, Clone, PartialEq)]
28348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28350#[cfg_attr(feature = "ts", derive(TS))]
28351#[cfg_attr(feature = "ts", ts(export))]
28352pub struct SET_MODE_DATA {
28353    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28354    pub custom_mode: u32,
28355    #[doc = "The system setting the mode"]
28356    pub target_system: u8,
28357    #[doc = "The new base mode."]
28358    pub base_mode: MavMode,
28359}
28360impl SET_MODE_DATA {
28361    pub const ENCODED_LEN: usize = 6usize;
28362    pub const DEFAULT: Self = Self {
28363        custom_mode: 0_u32,
28364        target_system: 0_u8,
28365        base_mode: MavMode::DEFAULT,
28366    };
28367    #[cfg(feature = "arbitrary")]
28368    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28369        use arbitrary::{Arbitrary, Unstructured};
28370        let mut buf = [0u8; 1024];
28371        rng.fill_bytes(&mut buf);
28372        let mut unstructured = Unstructured::new(&buf);
28373        Self::arbitrary(&mut unstructured).unwrap_or_default()
28374    }
28375}
28376impl Default for SET_MODE_DATA {
28377    fn default() -> Self {
28378        Self::DEFAULT.clone()
28379    }
28380}
28381impl MessageData for SET_MODE_DATA {
28382    type Message = MavMessage;
28383    const ID: u32 = 11u32;
28384    const NAME: &'static str = "SET_MODE";
28385    const EXTRA_CRC: u8 = 89u8;
28386    const ENCODED_LEN: usize = 6usize;
28387    fn deser(
28388        _version: MavlinkVersion,
28389        __input: &[u8],
28390    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28391        let avail_len = __input.len();
28392        let mut payload_buf = [0; Self::ENCODED_LEN];
28393        let mut buf = if avail_len < Self::ENCODED_LEN {
28394            payload_buf[0..avail_len].copy_from_slice(__input);
28395            Bytes::new(&payload_buf)
28396        } else {
28397            Bytes::new(__input)
28398        };
28399        let mut __struct = Self::default();
28400        __struct.custom_mode = buf.get_u32_le()?;
28401        __struct.target_system = buf.get_u8()?;
28402        let tmp = buf.get_u8()?;
28403        __struct.base_mode =
28404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28405                enum_type: "MavMode",
28406                value: tmp as u64,
28407            })?;
28408        Ok(__struct)
28409    }
28410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28411        let mut __tmp = BytesMut::new(bytes);
28412        #[allow(clippy::absurd_extreme_comparisons)]
28413        #[allow(unused_comparisons)]
28414        if __tmp.remaining() < Self::ENCODED_LEN {
28415            panic!(
28416                "buffer is too small (need {} bytes, but got {})",
28417                Self::ENCODED_LEN,
28418                __tmp.remaining(),
28419            )
28420        }
28421        __tmp.put_u32_le(self.custom_mode);
28422        __tmp.put_u8(self.target_system);
28423        __tmp.put_u8(self.base_mode as u8);
28424        if matches!(version, MavlinkVersion::V2) {
28425            let len = __tmp.len();
28426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28427        } else {
28428            __tmp.len()
28429        }
28430    }
28431}
28432#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28433#[doc = ""]
28434#[doc = "ID: 86"]
28435#[derive(Debug, Clone, PartialEq)]
28436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28438#[cfg_attr(feature = "ts", derive(TS))]
28439#[cfg_attr(feature = "ts", ts(export))]
28440pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28441    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28442    pub time_boot_ms: u32,
28443    #[doc = "Latitude in WGS84 frame"]
28444    pub lat_int: i32,
28445    #[doc = "Longitude in WGS84 frame"]
28446    pub lon_int: i32,
28447    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28448    pub alt: f32,
28449    #[doc = "X velocity in NED frame"]
28450    pub vx: f32,
28451    #[doc = "Y velocity in NED frame"]
28452    pub vy: f32,
28453    #[doc = "Z velocity in NED frame"]
28454    pub vz: f32,
28455    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28456    pub afx: f32,
28457    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28458    pub afy: f32,
28459    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28460    pub afz: f32,
28461    #[doc = "yaw setpoint"]
28462    pub yaw: f32,
28463    #[doc = "yaw rate setpoint"]
28464    pub yaw_rate: f32,
28465    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28466    pub type_mask: PositionTargetTypemask,
28467    #[doc = "System ID"]
28468    pub target_system: u8,
28469    #[doc = "Component ID"]
28470    pub target_component: u8,
28471    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28472    pub coordinate_frame: MavFrame,
28473}
28474impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28475    pub const ENCODED_LEN: usize = 53usize;
28476    pub const DEFAULT: Self = Self {
28477        time_boot_ms: 0_u32,
28478        lat_int: 0_i32,
28479        lon_int: 0_i32,
28480        alt: 0.0_f32,
28481        vx: 0.0_f32,
28482        vy: 0.0_f32,
28483        vz: 0.0_f32,
28484        afx: 0.0_f32,
28485        afy: 0.0_f32,
28486        afz: 0.0_f32,
28487        yaw: 0.0_f32,
28488        yaw_rate: 0.0_f32,
28489        type_mask: PositionTargetTypemask::DEFAULT,
28490        target_system: 0_u8,
28491        target_component: 0_u8,
28492        coordinate_frame: MavFrame::DEFAULT,
28493    };
28494    #[cfg(feature = "arbitrary")]
28495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28496        use arbitrary::{Arbitrary, Unstructured};
28497        let mut buf = [0u8; 1024];
28498        rng.fill_bytes(&mut buf);
28499        let mut unstructured = Unstructured::new(&buf);
28500        Self::arbitrary(&mut unstructured).unwrap_or_default()
28501    }
28502}
28503impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28504    fn default() -> Self {
28505        Self::DEFAULT.clone()
28506    }
28507}
28508impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28509    type Message = MavMessage;
28510    const ID: u32 = 86u32;
28511    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28512    const EXTRA_CRC: u8 = 5u8;
28513    const ENCODED_LEN: usize = 53usize;
28514    fn deser(
28515        _version: MavlinkVersion,
28516        __input: &[u8],
28517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28518        let avail_len = __input.len();
28519        let mut payload_buf = [0; Self::ENCODED_LEN];
28520        let mut buf = if avail_len < Self::ENCODED_LEN {
28521            payload_buf[0..avail_len].copy_from_slice(__input);
28522            Bytes::new(&payload_buf)
28523        } else {
28524            Bytes::new(__input)
28525        };
28526        let mut __struct = Self::default();
28527        __struct.time_boot_ms = buf.get_u32_le()?;
28528        __struct.lat_int = buf.get_i32_le()?;
28529        __struct.lon_int = buf.get_i32_le()?;
28530        __struct.alt = buf.get_f32_le()?;
28531        __struct.vx = buf.get_f32_le()?;
28532        __struct.vy = buf.get_f32_le()?;
28533        __struct.vz = buf.get_f32_le()?;
28534        __struct.afx = buf.get_f32_le()?;
28535        __struct.afy = buf.get_f32_le()?;
28536        __struct.afz = buf.get_f32_le()?;
28537        __struct.yaw = buf.get_f32_le()?;
28538        __struct.yaw_rate = buf.get_f32_le()?;
28539        let tmp = buf.get_u16_le()?;
28540        __struct.type_mask =
28541            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28542                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28543                    flag_type: "PositionTargetTypemask",
28544                    value: tmp as u64,
28545                })?;
28546        __struct.target_system = buf.get_u8()?;
28547        __struct.target_component = buf.get_u8()?;
28548        let tmp = buf.get_u8()?;
28549        __struct.coordinate_frame =
28550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28551                enum_type: "MavFrame",
28552                value: tmp as u64,
28553            })?;
28554        Ok(__struct)
28555    }
28556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28557        let mut __tmp = BytesMut::new(bytes);
28558        #[allow(clippy::absurd_extreme_comparisons)]
28559        #[allow(unused_comparisons)]
28560        if __tmp.remaining() < Self::ENCODED_LEN {
28561            panic!(
28562                "buffer is too small (need {} bytes, but got {})",
28563                Self::ENCODED_LEN,
28564                __tmp.remaining(),
28565            )
28566        }
28567        __tmp.put_u32_le(self.time_boot_ms);
28568        __tmp.put_i32_le(self.lat_int);
28569        __tmp.put_i32_le(self.lon_int);
28570        __tmp.put_f32_le(self.alt);
28571        __tmp.put_f32_le(self.vx);
28572        __tmp.put_f32_le(self.vy);
28573        __tmp.put_f32_le(self.vz);
28574        __tmp.put_f32_le(self.afx);
28575        __tmp.put_f32_le(self.afy);
28576        __tmp.put_f32_le(self.afz);
28577        __tmp.put_f32_le(self.yaw);
28578        __tmp.put_f32_le(self.yaw_rate);
28579        __tmp.put_u16_le(self.type_mask.bits() as u16);
28580        __tmp.put_u8(self.target_system);
28581        __tmp.put_u8(self.target_component);
28582        __tmp.put_u8(self.coordinate_frame as u8);
28583        if matches!(version, MavlinkVersion::V2) {
28584            let len = __tmp.len();
28585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28586        } else {
28587            __tmp.len()
28588        }
28589    }
28590}
28591#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28592#[doc = ""]
28593#[doc = "ID: 84"]
28594#[derive(Debug, Clone, PartialEq)]
28595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28597#[cfg_attr(feature = "ts", derive(TS))]
28598#[cfg_attr(feature = "ts", ts(export))]
28599pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28600    #[doc = "Timestamp (time since system boot)."]
28601    pub time_boot_ms: u32,
28602    #[doc = "X Position in NED frame"]
28603    pub x: f32,
28604    #[doc = "Y Position in NED frame"]
28605    pub y: f32,
28606    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28607    pub z: f32,
28608    #[doc = "X velocity in NED frame"]
28609    pub vx: f32,
28610    #[doc = "Y velocity in NED frame"]
28611    pub vy: f32,
28612    #[doc = "Z velocity in NED frame"]
28613    pub vz: f32,
28614    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28615    pub afx: f32,
28616    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28617    pub afy: f32,
28618    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28619    pub afz: f32,
28620    #[doc = "yaw setpoint"]
28621    pub yaw: f32,
28622    #[doc = "yaw rate setpoint"]
28623    pub yaw_rate: f32,
28624    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28625    pub type_mask: PositionTargetTypemask,
28626    #[doc = "System ID"]
28627    pub target_system: u8,
28628    #[doc = "Component ID"]
28629    pub target_component: u8,
28630    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28631    pub coordinate_frame: MavFrame,
28632}
28633impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28634    pub const ENCODED_LEN: usize = 53usize;
28635    pub const DEFAULT: Self = Self {
28636        time_boot_ms: 0_u32,
28637        x: 0.0_f32,
28638        y: 0.0_f32,
28639        z: 0.0_f32,
28640        vx: 0.0_f32,
28641        vy: 0.0_f32,
28642        vz: 0.0_f32,
28643        afx: 0.0_f32,
28644        afy: 0.0_f32,
28645        afz: 0.0_f32,
28646        yaw: 0.0_f32,
28647        yaw_rate: 0.0_f32,
28648        type_mask: PositionTargetTypemask::DEFAULT,
28649        target_system: 0_u8,
28650        target_component: 0_u8,
28651        coordinate_frame: MavFrame::DEFAULT,
28652    };
28653    #[cfg(feature = "arbitrary")]
28654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28655        use arbitrary::{Arbitrary, Unstructured};
28656        let mut buf = [0u8; 1024];
28657        rng.fill_bytes(&mut buf);
28658        let mut unstructured = Unstructured::new(&buf);
28659        Self::arbitrary(&mut unstructured).unwrap_or_default()
28660    }
28661}
28662impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28663    fn default() -> Self {
28664        Self::DEFAULT.clone()
28665    }
28666}
28667impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28668    type Message = MavMessage;
28669    const ID: u32 = 84u32;
28670    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28671    const EXTRA_CRC: u8 = 143u8;
28672    const ENCODED_LEN: usize = 53usize;
28673    fn deser(
28674        _version: MavlinkVersion,
28675        __input: &[u8],
28676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28677        let avail_len = __input.len();
28678        let mut payload_buf = [0; Self::ENCODED_LEN];
28679        let mut buf = if avail_len < Self::ENCODED_LEN {
28680            payload_buf[0..avail_len].copy_from_slice(__input);
28681            Bytes::new(&payload_buf)
28682        } else {
28683            Bytes::new(__input)
28684        };
28685        let mut __struct = Self::default();
28686        __struct.time_boot_ms = buf.get_u32_le()?;
28687        __struct.x = buf.get_f32_le()?;
28688        __struct.y = buf.get_f32_le()?;
28689        __struct.z = buf.get_f32_le()?;
28690        __struct.vx = buf.get_f32_le()?;
28691        __struct.vy = buf.get_f32_le()?;
28692        __struct.vz = buf.get_f32_le()?;
28693        __struct.afx = buf.get_f32_le()?;
28694        __struct.afy = buf.get_f32_le()?;
28695        __struct.afz = buf.get_f32_le()?;
28696        __struct.yaw = buf.get_f32_le()?;
28697        __struct.yaw_rate = buf.get_f32_le()?;
28698        let tmp = buf.get_u16_le()?;
28699        __struct.type_mask =
28700            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28701                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28702                    flag_type: "PositionTargetTypemask",
28703                    value: tmp as u64,
28704                })?;
28705        __struct.target_system = buf.get_u8()?;
28706        __struct.target_component = buf.get_u8()?;
28707        let tmp = buf.get_u8()?;
28708        __struct.coordinate_frame =
28709            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28710                enum_type: "MavFrame",
28711                value: tmp as u64,
28712            })?;
28713        Ok(__struct)
28714    }
28715    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28716        let mut __tmp = BytesMut::new(bytes);
28717        #[allow(clippy::absurd_extreme_comparisons)]
28718        #[allow(unused_comparisons)]
28719        if __tmp.remaining() < Self::ENCODED_LEN {
28720            panic!(
28721                "buffer is too small (need {} bytes, but got {})",
28722                Self::ENCODED_LEN,
28723                __tmp.remaining(),
28724            )
28725        }
28726        __tmp.put_u32_le(self.time_boot_ms);
28727        __tmp.put_f32_le(self.x);
28728        __tmp.put_f32_le(self.y);
28729        __tmp.put_f32_le(self.z);
28730        __tmp.put_f32_le(self.vx);
28731        __tmp.put_f32_le(self.vy);
28732        __tmp.put_f32_le(self.vz);
28733        __tmp.put_f32_le(self.afx);
28734        __tmp.put_f32_le(self.afy);
28735        __tmp.put_f32_le(self.afz);
28736        __tmp.put_f32_le(self.yaw);
28737        __tmp.put_f32_le(self.yaw_rate);
28738        __tmp.put_u16_le(self.type_mask.bits() as u16);
28739        __tmp.put_u8(self.target_system);
28740        __tmp.put_u8(self.target_component);
28741        __tmp.put_u8(self.coordinate_frame as u8);
28742        if matches!(version, MavlinkVersion::V2) {
28743            let len = __tmp.len();
28744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28745        } else {
28746            __tmp.len()
28747        }
28748    }
28749}
28750#[doc = "Status of simulation environment, if used."]
28751#[doc = ""]
28752#[doc = "ID: 108"]
28753#[derive(Debug, Clone, PartialEq)]
28754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28756#[cfg_attr(feature = "ts", derive(TS))]
28757#[cfg_attr(feature = "ts", ts(export))]
28758pub struct SIM_STATE_DATA {
28759    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28760    pub q1: f32,
28761    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28762    pub q2: f32,
28763    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28764    pub q3: f32,
28765    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28766    pub q4: f32,
28767    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28768    pub roll: f32,
28769    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28770    pub pitch: f32,
28771    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28772    pub yaw: f32,
28773    #[doc = "X acceleration"]
28774    pub xacc: f32,
28775    #[doc = "Y acceleration"]
28776    pub yacc: f32,
28777    #[doc = "Z acceleration"]
28778    pub zacc: f32,
28779    #[doc = "Angular speed around X axis"]
28780    pub xgyro: f32,
28781    #[doc = "Angular speed around Y axis"]
28782    pub ygyro: f32,
28783    #[doc = "Angular speed around Z axis"]
28784    pub zgyro: f32,
28785    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28786    pub lat: f32,
28787    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28788    pub lon: f32,
28789    #[doc = "Altitude"]
28790    pub alt: f32,
28791    #[doc = "Horizontal position standard deviation"]
28792    pub std_dev_horz: f32,
28793    #[doc = "Vertical position standard deviation"]
28794    pub std_dev_vert: f32,
28795    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28796    pub vn: f32,
28797    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28798    pub ve: f32,
28799    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28800    pub vd: f32,
28801    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28803    pub lat_int: i32,
28804    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28806    pub lon_int: i32,
28807}
28808impl SIM_STATE_DATA {
28809    pub const ENCODED_LEN: usize = 92usize;
28810    pub const DEFAULT: Self = Self {
28811        q1: 0.0_f32,
28812        q2: 0.0_f32,
28813        q3: 0.0_f32,
28814        q4: 0.0_f32,
28815        roll: 0.0_f32,
28816        pitch: 0.0_f32,
28817        yaw: 0.0_f32,
28818        xacc: 0.0_f32,
28819        yacc: 0.0_f32,
28820        zacc: 0.0_f32,
28821        xgyro: 0.0_f32,
28822        ygyro: 0.0_f32,
28823        zgyro: 0.0_f32,
28824        lat: 0.0_f32,
28825        lon: 0.0_f32,
28826        alt: 0.0_f32,
28827        std_dev_horz: 0.0_f32,
28828        std_dev_vert: 0.0_f32,
28829        vn: 0.0_f32,
28830        ve: 0.0_f32,
28831        vd: 0.0_f32,
28832        lat_int: 0_i32,
28833        lon_int: 0_i32,
28834    };
28835    #[cfg(feature = "arbitrary")]
28836    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28837        use arbitrary::{Arbitrary, Unstructured};
28838        let mut buf = [0u8; 1024];
28839        rng.fill_bytes(&mut buf);
28840        let mut unstructured = Unstructured::new(&buf);
28841        Self::arbitrary(&mut unstructured).unwrap_or_default()
28842    }
28843}
28844impl Default for SIM_STATE_DATA {
28845    fn default() -> Self {
28846        Self::DEFAULT.clone()
28847    }
28848}
28849impl MessageData for SIM_STATE_DATA {
28850    type Message = MavMessage;
28851    const ID: u32 = 108u32;
28852    const NAME: &'static str = "SIM_STATE";
28853    const EXTRA_CRC: u8 = 32u8;
28854    const ENCODED_LEN: usize = 92usize;
28855    fn deser(
28856        _version: MavlinkVersion,
28857        __input: &[u8],
28858    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28859        let avail_len = __input.len();
28860        let mut payload_buf = [0; Self::ENCODED_LEN];
28861        let mut buf = if avail_len < Self::ENCODED_LEN {
28862            payload_buf[0..avail_len].copy_from_slice(__input);
28863            Bytes::new(&payload_buf)
28864        } else {
28865            Bytes::new(__input)
28866        };
28867        let mut __struct = Self::default();
28868        __struct.q1 = buf.get_f32_le()?;
28869        __struct.q2 = buf.get_f32_le()?;
28870        __struct.q3 = buf.get_f32_le()?;
28871        __struct.q4 = buf.get_f32_le()?;
28872        __struct.roll = buf.get_f32_le()?;
28873        __struct.pitch = buf.get_f32_le()?;
28874        __struct.yaw = buf.get_f32_le()?;
28875        __struct.xacc = buf.get_f32_le()?;
28876        __struct.yacc = buf.get_f32_le()?;
28877        __struct.zacc = buf.get_f32_le()?;
28878        __struct.xgyro = buf.get_f32_le()?;
28879        __struct.ygyro = buf.get_f32_le()?;
28880        __struct.zgyro = buf.get_f32_le()?;
28881        __struct.lat = buf.get_f32_le()?;
28882        __struct.lon = buf.get_f32_le()?;
28883        __struct.alt = buf.get_f32_le()?;
28884        __struct.std_dev_horz = buf.get_f32_le()?;
28885        __struct.std_dev_vert = buf.get_f32_le()?;
28886        __struct.vn = buf.get_f32_le()?;
28887        __struct.ve = buf.get_f32_le()?;
28888        __struct.vd = buf.get_f32_le()?;
28889        __struct.lat_int = buf.get_i32_le()?;
28890        __struct.lon_int = buf.get_i32_le()?;
28891        Ok(__struct)
28892    }
28893    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28894        let mut __tmp = BytesMut::new(bytes);
28895        #[allow(clippy::absurd_extreme_comparisons)]
28896        #[allow(unused_comparisons)]
28897        if __tmp.remaining() < Self::ENCODED_LEN {
28898            panic!(
28899                "buffer is too small (need {} bytes, but got {})",
28900                Self::ENCODED_LEN,
28901                __tmp.remaining(),
28902            )
28903        }
28904        __tmp.put_f32_le(self.q1);
28905        __tmp.put_f32_le(self.q2);
28906        __tmp.put_f32_le(self.q3);
28907        __tmp.put_f32_le(self.q4);
28908        __tmp.put_f32_le(self.roll);
28909        __tmp.put_f32_le(self.pitch);
28910        __tmp.put_f32_le(self.yaw);
28911        __tmp.put_f32_le(self.xacc);
28912        __tmp.put_f32_le(self.yacc);
28913        __tmp.put_f32_le(self.zacc);
28914        __tmp.put_f32_le(self.xgyro);
28915        __tmp.put_f32_le(self.ygyro);
28916        __tmp.put_f32_le(self.zgyro);
28917        __tmp.put_f32_le(self.lat);
28918        __tmp.put_f32_le(self.lon);
28919        __tmp.put_f32_le(self.alt);
28920        __tmp.put_f32_le(self.std_dev_horz);
28921        __tmp.put_f32_le(self.std_dev_vert);
28922        __tmp.put_f32_le(self.vn);
28923        __tmp.put_f32_le(self.ve);
28924        __tmp.put_f32_le(self.vd);
28925        if matches!(version, MavlinkVersion::V2) {
28926            __tmp.put_i32_le(self.lat_int);
28927            __tmp.put_i32_le(self.lon_int);
28928            let len = __tmp.len();
28929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28930        } else {
28931            __tmp.len()
28932        }
28933    }
28934}
28935#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28936#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28937#[doc = ""]
28938#[doc = "ID: 370"]
28939#[derive(Debug, Clone, PartialEq)]
28940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28942#[cfg_attr(feature = "ts", derive(TS))]
28943#[cfg_attr(feature = "ts", ts(export))]
28944pub struct SMART_BATTERY_INFO_DATA {
28945    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28946    pub capacity_full_specification: i32,
28947    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28948    pub capacity_full: i32,
28949    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28950    pub cycle_count: u16,
28951    #[doc = "Battery weight. 0: field not provided."]
28952    pub weight: u16,
28953    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28954    pub discharge_minimum_voltage: u16,
28955    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28956    pub charging_minimum_voltage: u16,
28957    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28958    pub resting_minimum_voltage: u16,
28959    #[doc = "Battery ID"]
28960    pub id: u8,
28961    #[doc = "Function of the battery"]
28962    pub battery_function: MavBatteryFunction,
28963    #[doc = "Type (chemistry) of the battery"]
28964    pub mavtype: MavBatteryType,
28965    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28966    #[cfg_attr(feature = "ts", ts(type = "string"))]
28967    pub serial_number: CharArray<16>,
28968    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28969    #[cfg_attr(feature = "ts", ts(type = "string"))]
28970    pub device_name: CharArray<50>,
28971    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28973    pub charging_maximum_voltage: u16,
28974    #[doc = "Number of battery cells in series. 0: field not provided."]
28975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28976    pub cells_in_series: u8,
28977    #[doc = "Maximum pack discharge current. 0: field not provided."]
28978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28979    pub discharge_maximum_current: u32,
28980    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28982    pub discharge_maximum_burst_current: u32,
28983    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28985    #[cfg_attr(feature = "ts", ts(type = "string"))]
28986    pub manufacture_date: CharArray<11>,
28987}
28988impl SMART_BATTERY_INFO_DATA {
28989    pub const ENCODED_LEN: usize = 109usize;
28990    pub const DEFAULT: Self = Self {
28991        capacity_full_specification: 0_i32,
28992        capacity_full: 0_i32,
28993        cycle_count: 0_u16,
28994        weight: 0_u16,
28995        discharge_minimum_voltage: 0_u16,
28996        charging_minimum_voltage: 0_u16,
28997        resting_minimum_voltage: 0_u16,
28998        id: 0_u8,
28999        battery_function: MavBatteryFunction::DEFAULT,
29000        mavtype: MavBatteryType::DEFAULT,
29001        serial_number: CharArray::new([0_u8; 16usize]),
29002        device_name: CharArray::new([0_u8; 50usize]),
29003        charging_maximum_voltage: 0_u16,
29004        cells_in_series: 0_u8,
29005        discharge_maximum_current: 0_u32,
29006        discharge_maximum_burst_current: 0_u32,
29007        manufacture_date: CharArray::new([0_u8; 11usize]),
29008    };
29009    #[cfg(feature = "arbitrary")]
29010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29011        use arbitrary::{Arbitrary, Unstructured};
29012        let mut buf = [0u8; 1024];
29013        rng.fill_bytes(&mut buf);
29014        let mut unstructured = Unstructured::new(&buf);
29015        Self::arbitrary(&mut unstructured).unwrap_or_default()
29016    }
29017}
29018impl Default for SMART_BATTERY_INFO_DATA {
29019    fn default() -> Self {
29020        Self::DEFAULT.clone()
29021    }
29022}
29023impl MessageData for SMART_BATTERY_INFO_DATA {
29024    type Message = MavMessage;
29025    const ID: u32 = 370u32;
29026    const NAME: &'static str = "SMART_BATTERY_INFO";
29027    const EXTRA_CRC: u8 = 75u8;
29028    const ENCODED_LEN: usize = 109usize;
29029    fn deser(
29030        _version: MavlinkVersion,
29031        __input: &[u8],
29032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29033        let avail_len = __input.len();
29034        let mut payload_buf = [0; Self::ENCODED_LEN];
29035        let mut buf = if avail_len < Self::ENCODED_LEN {
29036            payload_buf[0..avail_len].copy_from_slice(__input);
29037            Bytes::new(&payload_buf)
29038        } else {
29039            Bytes::new(__input)
29040        };
29041        let mut __struct = Self::default();
29042        __struct.capacity_full_specification = buf.get_i32_le()?;
29043        __struct.capacity_full = buf.get_i32_le()?;
29044        __struct.cycle_count = buf.get_u16_le()?;
29045        __struct.weight = buf.get_u16_le()?;
29046        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
29047        __struct.charging_minimum_voltage = buf.get_u16_le()?;
29048        __struct.resting_minimum_voltage = buf.get_u16_le()?;
29049        __struct.id = buf.get_u8()?;
29050        let tmp = buf.get_u8()?;
29051        __struct.battery_function =
29052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29053                enum_type: "MavBatteryFunction",
29054                value: tmp as u64,
29055            })?;
29056        let tmp = buf.get_u8()?;
29057        __struct.mavtype =
29058            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29059                enum_type: "MavBatteryType",
29060                value: tmp as u64,
29061            })?;
29062        let mut tmp = [0_u8; 16usize];
29063        for v in &mut tmp {
29064            *v = buf.get_u8()?;
29065        }
29066        __struct.serial_number = CharArray::new(tmp);
29067        let mut tmp = [0_u8; 50usize];
29068        for v in &mut tmp {
29069            *v = buf.get_u8()?;
29070        }
29071        __struct.device_name = CharArray::new(tmp);
29072        __struct.charging_maximum_voltage = buf.get_u16_le()?;
29073        __struct.cells_in_series = buf.get_u8()?;
29074        __struct.discharge_maximum_current = buf.get_u32_le()?;
29075        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
29076        let mut tmp = [0_u8; 11usize];
29077        for v in &mut tmp {
29078            *v = buf.get_u8()?;
29079        }
29080        __struct.manufacture_date = CharArray::new(tmp);
29081        Ok(__struct)
29082    }
29083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29084        let mut __tmp = BytesMut::new(bytes);
29085        #[allow(clippy::absurd_extreme_comparisons)]
29086        #[allow(unused_comparisons)]
29087        if __tmp.remaining() < Self::ENCODED_LEN {
29088            panic!(
29089                "buffer is too small (need {} bytes, but got {})",
29090                Self::ENCODED_LEN,
29091                __tmp.remaining(),
29092            )
29093        }
29094        __tmp.put_i32_le(self.capacity_full_specification);
29095        __tmp.put_i32_le(self.capacity_full);
29096        __tmp.put_u16_le(self.cycle_count);
29097        __tmp.put_u16_le(self.weight);
29098        __tmp.put_u16_le(self.discharge_minimum_voltage);
29099        __tmp.put_u16_le(self.charging_minimum_voltage);
29100        __tmp.put_u16_le(self.resting_minimum_voltage);
29101        __tmp.put_u8(self.id);
29102        __tmp.put_u8(self.battery_function as u8);
29103        __tmp.put_u8(self.mavtype as u8);
29104        for val in &self.serial_number {
29105            __tmp.put_u8(*val);
29106        }
29107        for val in &self.device_name {
29108            __tmp.put_u8(*val);
29109        }
29110        if matches!(version, MavlinkVersion::V2) {
29111            __tmp.put_u16_le(self.charging_maximum_voltage);
29112            __tmp.put_u8(self.cells_in_series);
29113            __tmp.put_u32_le(self.discharge_maximum_current);
29114            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29115            for val in &self.manufacture_date {
29116                __tmp.put_u8(*val);
29117            }
29118            let len = __tmp.len();
29119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29120        } else {
29121            __tmp.len()
29122        }
29123    }
29124}
29125#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29126#[doc = ""]
29127#[doc = "ID: 253"]
29128#[derive(Debug, Clone, PartialEq)]
29129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29131#[cfg_attr(feature = "ts", derive(TS))]
29132#[cfg_attr(feature = "ts", ts(export))]
29133pub struct STATUSTEXT_DATA {
29134    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29135    pub severity: MavSeverity,
29136    #[doc = "Status text message, without null termination character"]
29137    #[cfg_attr(feature = "ts", ts(type = "string"))]
29138    pub text: CharArray<50>,
29139    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29141    pub id: u16,
29142    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29143    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29144    pub chunk_seq: u8,
29145}
29146impl STATUSTEXT_DATA {
29147    pub const ENCODED_LEN: usize = 54usize;
29148    pub const DEFAULT: Self = Self {
29149        severity: MavSeverity::DEFAULT,
29150        text: CharArray::new([0_u8; 50usize]),
29151        id: 0_u16,
29152        chunk_seq: 0_u8,
29153    };
29154    #[cfg(feature = "arbitrary")]
29155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29156        use arbitrary::{Arbitrary, Unstructured};
29157        let mut buf = [0u8; 1024];
29158        rng.fill_bytes(&mut buf);
29159        let mut unstructured = Unstructured::new(&buf);
29160        Self::arbitrary(&mut unstructured).unwrap_or_default()
29161    }
29162}
29163impl Default for STATUSTEXT_DATA {
29164    fn default() -> Self {
29165        Self::DEFAULT.clone()
29166    }
29167}
29168impl MessageData for STATUSTEXT_DATA {
29169    type Message = MavMessage;
29170    const ID: u32 = 253u32;
29171    const NAME: &'static str = "STATUSTEXT";
29172    const EXTRA_CRC: u8 = 83u8;
29173    const ENCODED_LEN: usize = 54usize;
29174    fn deser(
29175        _version: MavlinkVersion,
29176        __input: &[u8],
29177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29178        let avail_len = __input.len();
29179        let mut payload_buf = [0; Self::ENCODED_LEN];
29180        let mut buf = if avail_len < Self::ENCODED_LEN {
29181            payload_buf[0..avail_len].copy_from_slice(__input);
29182            Bytes::new(&payload_buf)
29183        } else {
29184            Bytes::new(__input)
29185        };
29186        let mut __struct = Self::default();
29187        let tmp = buf.get_u8()?;
29188        __struct.severity =
29189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29190                enum_type: "MavSeverity",
29191                value: tmp as u64,
29192            })?;
29193        let mut tmp = [0_u8; 50usize];
29194        for v in &mut tmp {
29195            *v = buf.get_u8()?;
29196        }
29197        __struct.text = CharArray::new(tmp);
29198        __struct.id = buf.get_u16_le()?;
29199        __struct.chunk_seq = buf.get_u8()?;
29200        Ok(__struct)
29201    }
29202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29203        let mut __tmp = BytesMut::new(bytes);
29204        #[allow(clippy::absurd_extreme_comparisons)]
29205        #[allow(unused_comparisons)]
29206        if __tmp.remaining() < Self::ENCODED_LEN {
29207            panic!(
29208                "buffer is too small (need {} bytes, but got {})",
29209                Self::ENCODED_LEN,
29210                __tmp.remaining(),
29211            )
29212        }
29213        __tmp.put_u8(self.severity as u8);
29214        for val in &self.text {
29215            __tmp.put_u8(*val);
29216        }
29217        if matches!(version, MavlinkVersion::V2) {
29218            __tmp.put_u16_le(self.id);
29219            __tmp.put_u8(self.chunk_seq);
29220            let len = __tmp.len();
29221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29222        } else {
29223            __tmp.len()
29224        }
29225    }
29226}
29227#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29228#[doc = ""]
29229#[doc = "ID: 261"]
29230#[derive(Debug, Clone, PartialEq)]
29231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29233#[cfg_attr(feature = "ts", derive(TS))]
29234#[cfg_attr(feature = "ts", ts(export))]
29235pub struct STORAGE_INFORMATION_DATA {
29236    #[doc = "Timestamp (time since system boot)."]
29237    pub time_boot_ms: u32,
29238    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29239    pub total_capacity: f32,
29240    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29241    pub used_capacity: f32,
29242    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29243    pub available_capacity: f32,
29244    #[doc = "Read speed."]
29245    pub read_speed: f32,
29246    #[doc = "Write speed."]
29247    pub write_speed: f32,
29248    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29249    pub storage_id: u8,
29250    #[doc = "Number of storage devices"]
29251    pub storage_count: u8,
29252    #[doc = "Status of storage"]
29253    pub status: StorageStatus,
29254    #[doc = "Type of storage"]
29255    #[cfg_attr(feature = "serde", serde(default))]
29256    pub mavtype: StorageType,
29257    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29259    #[cfg_attr(feature = "ts", ts(type = "string"))]
29260    pub name: CharArray<32>,
29261    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29262    #[cfg_attr(feature = "serde", serde(default))]
29263    pub storage_usage: StorageUsageFlag,
29264}
29265impl STORAGE_INFORMATION_DATA {
29266    pub const ENCODED_LEN: usize = 61usize;
29267    pub const DEFAULT: Self = Self {
29268        time_boot_ms: 0_u32,
29269        total_capacity: 0.0_f32,
29270        used_capacity: 0.0_f32,
29271        available_capacity: 0.0_f32,
29272        read_speed: 0.0_f32,
29273        write_speed: 0.0_f32,
29274        storage_id: 0_u8,
29275        storage_count: 0_u8,
29276        status: StorageStatus::DEFAULT,
29277        mavtype: StorageType::DEFAULT,
29278        name: CharArray::new([0_u8; 32usize]),
29279        storage_usage: StorageUsageFlag::DEFAULT,
29280    };
29281    #[cfg(feature = "arbitrary")]
29282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29283        use arbitrary::{Arbitrary, Unstructured};
29284        let mut buf = [0u8; 1024];
29285        rng.fill_bytes(&mut buf);
29286        let mut unstructured = Unstructured::new(&buf);
29287        Self::arbitrary(&mut unstructured).unwrap_or_default()
29288    }
29289}
29290impl Default for STORAGE_INFORMATION_DATA {
29291    fn default() -> Self {
29292        Self::DEFAULT.clone()
29293    }
29294}
29295impl MessageData for STORAGE_INFORMATION_DATA {
29296    type Message = MavMessage;
29297    const ID: u32 = 261u32;
29298    const NAME: &'static str = "STORAGE_INFORMATION";
29299    const EXTRA_CRC: u8 = 179u8;
29300    const ENCODED_LEN: usize = 61usize;
29301    fn deser(
29302        _version: MavlinkVersion,
29303        __input: &[u8],
29304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29305        let avail_len = __input.len();
29306        let mut payload_buf = [0; Self::ENCODED_LEN];
29307        let mut buf = if avail_len < Self::ENCODED_LEN {
29308            payload_buf[0..avail_len].copy_from_slice(__input);
29309            Bytes::new(&payload_buf)
29310        } else {
29311            Bytes::new(__input)
29312        };
29313        let mut __struct = Self::default();
29314        __struct.time_boot_ms = buf.get_u32_le()?;
29315        __struct.total_capacity = buf.get_f32_le()?;
29316        __struct.used_capacity = buf.get_f32_le()?;
29317        __struct.available_capacity = buf.get_f32_le()?;
29318        __struct.read_speed = buf.get_f32_le()?;
29319        __struct.write_speed = buf.get_f32_le()?;
29320        __struct.storage_id = buf.get_u8()?;
29321        __struct.storage_count = buf.get_u8()?;
29322        let tmp = buf.get_u8()?;
29323        __struct.status =
29324            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29325                enum_type: "StorageStatus",
29326                value: tmp as u64,
29327            })?;
29328        let tmp = buf.get_u8()?;
29329        __struct.mavtype =
29330            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29331                enum_type: "StorageType",
29332                value: tmp as u64,
29333            })?;
29334        let mut tmp = [0_u8; 32usize];
29335        for v in &mut tmp {
29336            *v = buf.get_u8()?;
29337        }
29338        __struct.name = CharArray::new(tmp);
29339        let tmp = buf.get_u8()?;
29340        __struct.storage_usage = StorageUsageFlag::from_bits(
29341            tmp as <StorageUsageFlag as Flags>::Bits,
29342        )
29343        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29344            flag_type: "StorageUsageFlag",
29345            value: tmp as u64,
29346        })?;
29347        Ok(__struct)
29348    }
29349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29350        let mut __tmp = BytesMut::new(bytes);
29351        #[allow(clippy::absurd_extreme_comparisons)]
29352        #[allow(unused_comparisons)]
29353        if __tmp.remaining() < Self::ENCODED_LEN {
29354            panic!(
29355                "buffer is too small (need {} bytes, but got {})",
29356                Self::ENCODED_LEN,
29357                __tmp.remaining(),
29358            )
29359        }
29360        __tmp.put_u32_le(self.time_boot_ms);
29361        __tmp.put_f32_le(self.total_capacity);
29362        __tmp.put_f32_le(self.used_capacity);
29363        __tmp.put_f32_le(self.available_capacity);
29364        __tmp.put_f32_le(self.read_speed);
29365        __tmp.put_f32_le(self.write_speed);
29366        __tmp.put_u8(self.storage_id);
29367        __tmp.put_u8(self.storage_count);
29368        __tmp.put_u8(self.status as u8);
29369        if matches!(version, MavlinkVersion::V2) {
29370            __tmp.put_u8(self.mavtype as u8);
29371            for val in &self.name {
29372                __tmp.put_u8(*val);
29373            }
29374            __tmp.put_u8(self.storage_usage.bits() as u8);
29375            let len = __tmp.len();
29376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29377        } else {
29378            __tmp.len()
29379        }
29380    }
29381}
29382#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29383#[doc = ""]
29384#[doc = "ID: 401"]
29385#[derive(Debug, Clone, PartialEq)]
29386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29388#[cfg_attr(feature = "ts", derive(TS))]
29389#[cfg_attr(feature = "ts", ts(export))]
29390pub struct SUPPORTED_TUNES_DATA {
29391    #[doc = "Bitfield of supported tune formats."]
29392    pub format: TuneFormat,
29393    #[doc = "System ID"]
29394    pub target_system: u8,
29395    #[doc = "Component ID"]
29396    pub target_component: u8,
29397}
29398impl SUPPORTED_TUNES_DATA {
29399    pub const ENCODED_LEN: usize = 6usize;
29400    pub const DEFAULT: Self = Self {
29401        format: TuneFormat::DEFAULT,
29402        target_system: 0_u8,
29403        target_component: 0_u8,
29404    };
29405    #[cfg(feature = "arbitrary")]
29406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29407        use arbitrary::{Arbitrary, Unstructured};
29408        let mut buf = [0u8; 1024];
29409        rng.fill_bytes(&mut buf);
29410        let mut unstructured = Unstructured::new(&buf);
29411        Self::arbitrary(&mut unstructured).unwrap_or_default()
29412    }
29413}
29414impl Default for SUPPORTED_TUNES_DATA {
29415    fn default() -> Self {
29416        Self::DEFAULT.clone()
29417    }
29418}
29419impl MessageData for SUPPORTED_TUNES_DATA {
29420    type Message = MavMessage;
29421    const ID: u32 = 401u32;
29422    const NAME: &'static str = "SUPPORTED_TUNES";
29423    const EXTRA_CRC: u8 = 183u8;
29424    const ENCODED_LEN: usize = 6usize;
29425    fn deser(
29426        _version: MavlinkVersion,
29427        __input: &[u8],
29428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29429        let avail_len = __input.len();
29430        let mut payload_buf = [0; Self::ENCODED_LEN];
29431        let mut buf = if avail_len < Self::ENCODED_LEN {
29432            payload_buf[0..avail_len].copy_from_slice(__input);
29433            Bytes::new(&payload_buf)
29434        } else {
29435            Bytes::new(__input)
29436        };
29437        let mut __struct = Self::default();
29438        let tmp = buf.get_u32_le()?;
29439        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29440            ::mavlink_core::error::ParserError::InvalidEnum {
29441                enum_type: "TuneFormat",
29442                value: tmp as u64,
29443            },
29444        )?;
29445        __struct.target_system = buf.get_u8()?;
29446        __struct.target_component = buf.get_u8()?;
29447        Ok(__struct)
29448    }
29449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29450        let mut __tmp = BytesMut::new(bytes);
29451        #[allow(clippy::absurd_extreme_comparisons)]
29452        #[allow(unused_comparisons)]
29453        if __tmp.remaining() < Self::ENCODED_LEN {
29454            panic!(
29455                "buffer is too small (need {} bytes, but got {})",
29456                Self::ENCODED_LEN,
29457                __tmp.remaining(),
29458            )
29459        }
29460        __tmp.put_u32_le(self.format as u32);
29461        __tmp.put_u8(self.target_system);
29462        __tmp.put_u8(self.target_component);
29463        if matches!(version, MavlinkVersion::V2) {
29464            let len = __tmp.len();
29465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29466        } else {
29467            __tmp.len()
29468        }
29469    }
29470}
29471#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29472#[doc = ""]
29473#[doc = "ID: 2"]
29474#[derive(Debug, Clone, PartialEq)]
29475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29477#[cfg_attr(feature = "ts", derive(TS))]
29478#[cfg_attr(feature = "ts", ts(export))]
29479pub struct SYSTEM_TIME_DATA {
29480    #[doc = "Timestamp (UNIX epoch time)."]
29481    pub time_unix_usec: u64,
29482    #[doc = "Timestamp (time since system boot)."]
29483    pub time_boot_ms: u32,
29484}
29485impl SYSTEM_TIME_DATA {
29486    pub const ENCODED_LEN: usize = 12usize;
29487    pub const DEFAULT: Self = Self {
29488        time_unix_usec: 0_u64,
29489        time_boot_ms: 0_u32,
29490    };
29491    #[cfg(feature = "arbitrary")]
29492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29493        use arbitrary::{Arbitrary, Unstructured};
29494        let mut buf = [0u8; 1024];
29495        rng.fill_bytes(&mut buf);
29496        let mut unstructured = Unstructured::new(&buf);
29497        Self::arbitrary(&mut unstructured).unwrap_or_default()
29498    }
29499}
29500impl Default for SYSTEM_TIME_DATA {
29501    fn default() -> Self {
29502        Self::DEFAULT.clone()
29503    }
29504}
29505impl MessageData for SYSTEM_TIME_DATA {
29506    type Message = MavMessage;
29507    const ID: u32 = 2u32;
29508    const NAME: &'static str = "SYSTEM_TIME";
29509    const EXTRA_CRC: u8 = 137u8;
29510    const ENCODED_LEN: usize = 12usize;
29511    fn deser(
29512        _version: MavlinkVersion,
29513        __input: &[u8],
29514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29515        let avail_len = __input.len();
29516        let mut payload_buf = [0; Self::ENCODED_LEN];
29517        let mut buf = if avail_len < Self::ENCODED_LEN {
29518            payload_buf[0..avail_len].copy_from_slice(__input);
29519            Bytes::new(&payload_buf)
29520        } else {
29521            Bytes::new(__input)
29522        };
29523        let mut __struct = Self::default();
29524        __struct.time_unix_usec = buf.get_u64_le()?;
29525        __struct.time_boot_ms = buf.get_u32_le()?;
29526        Ok(__struct)
29527    }
29528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29529        let mut __tmp = BytesMut::new(bytes);
29530        #[allow(clippy::absurd_extreme_comparisons)]
29531        #[allow(unused_comparisons)]
29532        if __tmp.remaining() < Self::ENCODED_LEN {
29533            panic!(
29534                "buffer is too small (need {} bytes, but got {})",
29535                Self::ENCODED_LEN,
29536                __tmp.remaining(),
29537            )
29538        }
29539        __tmp.put_u64_le(self.time_unix_usec);
29540        __tmp.put_u32_le(self.time_boot_ms);
29541        if matches!(version, MavlinkVersion::V2) {
29542            let len = __tmp.len();
29543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29544        } else {
29545            __tmp.len()
29546        }
29547    }
29548}
29549#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29550#[doc = ""]
29551#[doc = "ID: 1"]
29552#[derive(Debug, Clone, PartialEq)]
29553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29555#[cfg_attr(feature = "ts", derive(TS))]
29556#[cfg_attr(feature = "ts", ts(export))]
29557pub struct SYS_STATUS_DATA {
29558    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29559    pub onboard_control_sensors_present: MavSysStatusSensor,
29560    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29561    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29562    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29563    pub onboard_control_sensors_health: MavSysStatusSensor,
29564    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29565    pub load: u16,
29566    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29567    pub voltage_battery: u16,
29568    #[doc = "Battery current, -1: Current not sent by autopilot"]
29569    pub current_battery: i16,
29570    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29571    pub drop_rate_comm: u16,
29572    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29573    pub errors_comm: u16,
29574    #[doc = "Autopilot-specific errors"]
29575    pub errors_count1: u16,
29576    #[doc = "Autopilot-specific errors"]
29577    pub errors_count2: u16,
29578    #[doc = "Autopilot-specific errors"]
29579    pub errors_count3: u16,
29580    #[doc = "Autopilot-specific errors"]
29581    pub errors_count4: u16,
29582    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29583    pub battery_remaining: i8,
29584    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29585    #[cfg_attr(feature = "serde", serde(default))]
29586    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29587    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29588    #[cfg_attr(feature = "serde", serde(default))]
29589    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29590    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29591    #[cfg_attr(feature = "serde", serde(default))]
29592    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29593}
29594impl SYS_STATUS_DATA {
29595    pub const ENCODED_LEN: usize = 43usize;
29596    pub const DEFAULT: Self = Self {
29597        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29598        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29599        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29600        load: 0_u16,
29601        voltage_battery: 0_u16,
29602        current_battery: 0_i16,
29603        drop_rate_comm: 0_u16,
29604        errors_comm: 0_u16,
29605        errors_count1: 0_u16,
29606        errors_count2: 0_u16,
29607        errors_count3: 0_u16,
29608        errors_count4: 0_u16,
29609        battery_remaining: 0_i8,
29610        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29611        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29612        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29613    };
29614    #[cfg(feature = "arbitrary")]
29615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29616        use arbitrary::{Arbitrary, Unstructured};
29617        let mut buf = [0u8; 1024];
29618        rng.fill_bytes(&mut buf);
29619        let mut unstructured = Unstructured::new(&buf);
29620        Self::arbitrary(&mut unstructured).unwrap_or_default()
29621    }
29622}
29623impl Default for SYS_STATUS_DATA {
29624    fn default() -> Self {
29625        Self::DEFAULT.clone()
29626    }
29627}
29628impl MessageData for SYS_STATUS_DATA {
29629    type Message = MavMessage;
29630    const ID: u32 = 1u32;
29631    const NAME: &'static str = "SYS_STATUS";
29632    const EXTRA_CRC: u8 = 124u8;
29633    const ENCODED_LEN: usize = 43usize;
29634    fn deser(
29635        _version: MavlinkVersion,
29636        __input: &[u8],
29637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29638        let avail_len = __input.len();
29639        let mut payload_buf = [0; Self::ENCODED_LEN];
29640        let mut buf = if avail_len < Self::ENCODED_LEN {
29641            payload_buf[0..avail_len].copy_from_slice(__input);
29642            Bytes::new(&payload_buf)
29643        } else {
29644            Bytes::new(__input)
29645        };
29646        let mut __struct = Self::default();
29647        let tmp = buf.get_u32_le()?;
29648        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29649            tmp as <MavSysStatusSensor as Flags>::Bits,
29650        )
29651        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29652            flag_type: "MavSysStatusSensor",
29653            value: tmp as u64,
29654        })?;
29655        let tmp = buf.get_u32_le()?;
29656        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29657            tmp as <MavSysStatusSensor as Flags>::Bits,
29658        )
29659        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29660            flag_type: "MavSysStatusSensor",
29661            value: tmp as u64,
29662        })?;
29663        let tmp = buf.get_u32_le()?;
29664        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29665            tmp as <MavSysStatusSensor as Flags>::Bits,
29666        )
29667        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29668            flag_type: "MavSysStatusSensor",
29669            value: tmp as u64,
29670        })?;
29671        __struct.load = buf.get_u16_le()?;
29672        __struct.voltage_battery = buf.get_u16_le()?;
29673        __struct.current_battery = buf.get_i16_le()?;
29674        __struct.drop_rate_comm = buf.get_u16_le()?;
29675        __struct.errors_comm = buf.get_u16_le()?;
29676        __struct.errors_count1 = buf.get_u16_le()?;
29677        __struct.errors_count2 = buf.get_u16_le()?;
29678        __struct.errors_count3 = buf.get_u16_le()?;
29679        __struct.errors_count4 = buf.get_u16_le()?;
29680        __struct.battery_remaining = buf.get_i8()?;
29681        let tmp = buf.get_u32_le()?;
29682        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29683            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29684        )
29685        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29686            flag_type: "MavSysStatusSensorExtended",
29687            value: tmp as u64,
29688        })?;
29689        let tmp = buf.get_u32_le()?;
29690        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29691            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29692        )
29693        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29694            flag_type: "MavSysStatusSensorExtended",
29695            value: tmp as u64,
29696        })?;
29697        let tmp = buf.get_u32_le()?;
29698        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29699            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29700        )
29701        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29702            flag_type: "MavSysStatusSensorExtended",
29703            value: tmp as u64,
29704        })?;
29705        Ok(__struct)
29706    }
29707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29708        let mut __tmp = BytesMut::new(bytes);
29709        #[allow(clippy::absurd_extreme_comparisons)]
29710        #[allow(unused_comparisons)]
29711        if __tmp.remaining() < Self::ENCODED_LEN {
29712            panic!(
29713                "buffer is too small (need {} bytes, but got {})",
29714                Self::ENCODED_LEN,
29715                __tmp.remaining(),
29716            )
29717        }
29718        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29719        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29720        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29721        __tmp.put_u16_le(self.load);
29722        __tmp.put_u16_le(self.voltage_battery);
29723        __tmp.put_i16_le(self.current_battery);
29724        __tmp.put_u16_le(self.drop_rate_comm);
29725        __tmp.put_u16_le(self.errors_comm);
29726        __tmp.put_u16_le(self.errors_count1);
29727        __tmp.put_u16_le(self.errors_count2);
29728        __tmp.put_u16_le(self.errors_count3);
29729        __tmp.put_u16_le(self.errors_count4);
29730        __tmp.put_i8(self.battery_remaining);
29731        if matches!(version, MavlinkVersion::V2) {
29732            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29733            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29734            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29735            let len = __tmp.len();
29736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29737        } else {
29738            __tmp.len()
29739        }
29740    }
29741}
29742#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29743#[doc = ""]
29744#[doc = "ID: 135"]
29745#[derive(Debug, Clone, PartialEq)]
29746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29748#[cfg_attr(feature = "ts", derive(TS))]
29749#[cfg_attr(feature = "ts", ts(export))]
29750pub struct TERRAIN_CHECK_DATA {
29751    #[doc = "Latitude"]
29752    pub lat: i32,
29753    #[doc = "Longitude"]
29754    pub lon: i32,
29755}
29756impl TERRAIN_CHECK_DATA {
29757    pub const ENCODED_LEN: usize = 8usize;
29758    pub const DEFAULT: Self = Self {
29759        lat: 0_i32,
29760        lon: 0_i32,
29761    };
29762    #[cfg(feature = "arbitrary")]
29763    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29764        use arbitrary::{Arbitrary, Unstructured};
29765        let mut buf = [0u8; 1024];
29766        rng.fill_bytes(&mut buf);
29767        let mut unstructured = Unstructured::new(&buf);
29768        Self::arbitrary(&mut unstructured).unwrap_or_default()
29769    }
29770}
29771impl Default for TERRAIN_CHECK_DATA {
29772    fn default() -> Self {
29773        Self::DEFAULT.clone()
29774    }
29775}
29776impl MessageData for TERRAIN_CHECK_DATA {
29777    type Message = MavMessage;
29778    const ID: u32 = 135u32;
29779    const NAME: &'static str = "TERRAIN_CHECK";
29780    const EXTRA_CRC: u8 = 203u8;
29781    const ENCODED_LEN: usize = 8usize;
29782    fn deser(
29783        _version: MavlinkVersion,
29784        __input: &[u8],
29785    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29786        let avail_len = __input.len();
29787        let mut payload_buf = [0; Self::ENCODED_LEN];
29788        let mut buf = if avail_len < Self::ENCODED_LEN {
29789            payload_buf[0..avail_len].copy_from_slice(__input);
29790            Bytes::new(&payload_buf)
29791        } else {
29792            Bytes::new(__input)
29793        };
29794        let mut __struct = Self::default();
29795        __struct.lat = buf.get_i32_le()?;
29796        __struct.lon = buf.get_i32_le()?;
29797        Ok(__struct)
29798    }
29799    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29800        let mut __tmp = BytesMut::new(bytes);
29801        #[allow(clippy::absurd_extreme_comparisons)]
29802        #[allow(unused_comparisons)]
29803        if __tmp.remaining() < Self::ENCODED_LEN {
29804            panic!(
29805                "buffer is too small (need {} bytes, but got {})",
29806                Self::ENCODED_LEN,
29807                __tmp.remaining(),
29808            )
29809        }
29810        __tmp.put_i32_le(self.lat);
29811        __tmp.put_i32_le(self.lon);
29812        if matches!(version, MavlinkVersion::V2) {
29813            let len = __tmp.len();
29814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29815        } else {
29816            __tmp.len()
29817        }
29818    }
29819}
29820#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29821#[doc = ""]
29822#[doc = "ID: 134"]
29823#[derive(Debug, Clone, PartialEq)]
29824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29826#[cfg_attr(feature = "ts", derive(TS))]
29827#[cfg_attr(feature = "ts", ts(export))]
29828pub struct TERRAIN_DATA_DATA {
29829    #[doc = "Latitude of SW corner of first grid"]
29830    pub lat: i32,
29831    #[doc = "Longitude of SW corner of first grid"]
29832    pub lon: i32,
29833    #[doc = "Grid spacing"]
29834    pub grid_spacing: u16,
29835    #[doc = "Terrain data MSL"]
29836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29837    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29838    pub data: [i16; 16],
29839    #[doc = "bit within the terrain request mask"]
29840    pub gridbit: u8,
29841}
29842impl TERRAIN_DATA_DATA {
29843    pub const ENCODED_LEN: usize = 43usize;
29844    pub const DEFAULT: Self = Self {
29845        lat: 0_i32,
29846        lon: 0_i32,
29847        grid_spacing: 0_u16,
29848        data: [0_i16; 16usize],
29849        gridbit: 0_u8,
29850    };
29851    #[cfg(feature = "arbitrary")]
29852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29853        use arbitrary::{Arbitrary, Unstructured};
29854        let mut buf = [0u8; 1024];
29855        rng.fill_bytes(&mut buf);
29856        let mut unstructured = Unstructured::new(&buf);
29857        Self::arbitrary(&mut unstructured).unwrap_or_default()
29858    }
29859}
29860impl Default for TERRAIN_DATA_DATA {
29861    fn default() -> Self {
29862        Self::DEFAULT.clone()
29863    }
29864}
29865impl MessageData for TERRAIN_DATA_DATA {
29866    type Message = MavMessage;
29867    const ID: u32 = 134u32;
29868    const NAME: &'static str = "TERRAIN_DATA";
29869    const EXTRA_CRC: u8 = 229u8;
29870    const ENCODED_LEN: usize = 43usize;
29871    fn deser(
29872        _version: MavlinkVersion,
29873        __input: &[u8],
29874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29875        let avail_len = __input.len();
29876        let mut payload_buf = [0; Self::ENCODED_LEN];
29877        let mut buf = if avail_len < Self::ENCODED_LEN {
29878            payload_buf[0..avail_len].copy_from_slice(__input);
29879            Bytes::new(&payload_buf)
29880        } else {
29881            Bytes::new(__input)
29882        };
29883        let mut __struct = Self::default();
29884        __struct.lat = buf.get_i32_le()?;
29885        __struct.lon = buf.get_i32_le()?;
29886        __struct.grid_spacing = buf.get_u16_le()?;
29887        for v in &mut __struct.data {
29888            let val = buf.get_i16_le()?;
29889            *v = val;
29890        }
29891        __struct.gridbit = buf.get_u8()?;
29892        Ok(__struct)
29893    }
29894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29895        let mut __tmp = BytesMut::new(bytes);
29896        #[allow(clippy::absurd_extreme_comparisons)]
29897        #[allow(unused_comparisons)]
29898        if __tmp.remaining() < Self::ENCODED_LEN {
29899            panic!(
29900                "buffer is too small (need {} bytes, but got {})",
29901                Self::ENCODED_LEN,
29902                __tmp.remaining(),
29903            )
29904        }
29905        __tmp.put_i32_le(self.lat);
29906        __tmp.put_i32_le(self.lon);
29907        __tmp.put_u16_le(self.grid_spacing);
29908        for val in &self.data {
29909            __tmp.put_i16_le(*val);
29910        }
29911        __tmp.put_u8(self.gridbit);
29912        if matches!(version, MavlinkVersion::V2) {
29913            let len = __tmp.len();
29914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29915        } else {
29916            __tmp.len()
29917        }
29918    }
29919}
29920#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29921#[doc = ""]
29922#[doc = "ID: 136"]
29923#[derive(Debug, Clone, PartialEq)]
29924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29926#[cfg_attr(feature = "ts", derive(TS))]
29927#[cfg_attr(feature = "ts", ts(export))]
29928pub struct TERRAIN_REPORT_DATA {
29929    #[doc = "Latitude"]
29930    pub lat: i32,
29931    #[doc = "Longitude"]
29932    pub lon: i32,
29933    #[doc = "Terrain height MSL"]
29934    pub terrain_height: f32,
29935    #[doc = "Current vehicle height above lat/lon terrain height"]
29936    pub current_height: f32,
29937    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29938    pub spacing: u16,
29939    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29940    pub pending: u16,
29941    #[doc = "Number of 4x4 terrain blocks in memory"]
29942    pub loaded: u16,
29943}
29944impl TERRAIN_REPORT_DATA {
29945    pub const ENCODED_LEN: usize = 22usize;
29946    pub const DEFAULT: Self = Self {
29947        lat: 0_i32,
29948        lon: 0_i32,
29949        terrain_height: 0.0_f32,
29950        current_height: 0.0_f32,
29951        spacing: 0_u16,
29952        pending: 0_u16,
29953        loaded: 0_u16,
29954    };
29955    #[cfg(feature = "arbitrary")]
29956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29957        use arbitrary::{Arbitrary, Unstructured};
29958        let mut buf = [0u8; 1024];
29959        rng.fill_bytes(&mut buf);
29960        let mut unstructured = Unstructured::new(&buf);
29961        Self::arbitrary(&mut unstructured).unwrap_or_default()
29962    }
29963}
29964impl Default for TERRAIN_REPORT_DATA {
29965    fn default() -> Self {
29966        Self::DEFAULT.clone()
29967    }
29968}
29969impl MessageData for TERRAIN_REPORT_DATA {
29970    type Message = MavMessage;
29971    const ID: u32 = 136u32;
29972    const NAME: &'static str = "TERRAIN_REPORT";
29973    const EXTRA_CRC: u8 = 1u8;
29974    const ENCODED_LEN: usize = 22usize;
29975    fn deser(
29976        _version: MavlinkVersion,
29977        __input: &[u8],
29978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29979        let avail_len = __input.len();
29980        let mut payload_buf = [0; Self::ENCODED_LEN];
29981        let mut buf = if avail_len < Self::ENCODED_LEN {
29982            payload_buf[0..avail_len].copy_from_slice(__input);
29983            Bytes::new(&payload_buf)
29984        } else {
29985            Bytes::new(__input)
29986        };
29987        let mut __struct = Self::default();
29988        __struct.lat = buf.get_i32_le()?;
29989        __struct.lon = buf.get_i32_le()?;
29990        __struct.terrain_height = buf.get_f32_le()?;
29991        __struct.current_height = buf.get_f32_le()?;
29992        __struct.spacing = buf.get_u16_le()?;
29993        __struct.pending = buf.get_u16_le()?;
29994        __struct.loaded = buf.get_u16_le()?;
29995        Ok(__struct)
29996    }
29997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29998        let mut __tmp = BytesMut::new(bytes);
29999        #[allow(clippy::absurd_extreme_comparisons)]
30000        #[allow(unused_comparisons)]
30001        if __tmp.remaining() < Self::ENCODED_LEN {
30002            panic!(
30003                "buffer is too small (need {} bytes, but got {})",
30004                Self::ENCODED_LEN,
30005                __tmp.remaining(),
30006            )
30007        }
30008        __tmp.put_i32_le(self.lat);
30009        __tmp.put_i32_le(self.lon);
30010        __tmp.put_f32_le(self.terrain_height);
30011        __tmp.put_f32_le(self.current_height);
30012        __tmp.put_u16_le(self.spacing);
30013        __tmp.put_u16_le(self.pending);
30014        __tmp.put_u16_le(self.loaded);
30015        if matches!(version, MavlinkVersion::V2) {
30016            let len = __tmp.len();
30017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30018        } else {
30019            __tmp.len()
30020        }
30021    }
30022}
30023#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30024#[doc = ""]
30025#[doc = "ID: 133"]
30026#[derive(Debug, Clone, PartialEq)]
30027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30029#[cfg_attr(feature = "ts", derive(TS))]
30030#[cfg_attr(feature = "ts", ts(export))]
30031pub struct TERRAIN_REQUEST_DATA {
30032    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30033    pub mask: u64,
30034    #[doc = "Latitude of SW corner of first grid"]
30035    pub lat: i32,
30036    #[doc = "Longitude of SW corner of first grid"]
30037    pub lon: i32,
30038    #[doc = "Grid spacing"]
30039    pub grid_spacing: u16,
30040}
30041impl TERRAIN_REQUEST_DATA {
30042    pub const ENCODED_LEN: usize = 18usize;
30043    pub const DEFAULT: Self = Self {
30044        mask: 0_u64,
30045        lat: 0_i32,
30046        lon: 0_i32,
30047        grid_spacing: 0_u16,
30048    };
30049    #[cfg(feature = "arbitrary")]
30050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30051        use arbitrary::{Arbitrary, Unstructured};
30052        let mut buf = [0u8; 1024];
30053        rng.fill_bytes(&mut buf);
30054        let mut unstructured = Unstructured::new(&buf);
30055        Self::arbitrary(&mut unstructured).unwrap_or_default()
30056    }
30057}
30058impl Default for TERRAIN_REQUEST_DATA {
30059    fn default() -> Self {
30060        Self::DEFAULT.clone()
30061    }
30062}
30063impl MessageData for TERRAIN_REQUEST_DATA {
30064    type Message = MavMessage;
30065    const ID: u32 = 133u32;
30066    const NAME: &'static str = "TERRAIN_REQUEST";
30067    const EXTRA_CRC: u8 = 6u8;
30068    const ENCODED_LEN: usize = 18usize;
30069    fn deser(
30070        _version: MavlinkVersion,
30071        __input: &[u8],
30072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30073        let avail_len = __input.len();
30074        let mut payload_buf = [0; Self::ENCODED_LEN];
30075        let mut buf = if avail_len < Self::ENCODED_LEN {
30076            payload_buf[0..avail_len].copy_from_slice(__input);
30077            Bytes::new(&payload_buf)
30078        } else {
30079            Bytes::new(__input)
30080        };
30081        let mut __struct = Self::default();
30082        __struct.mask = buf.get_u64_le()?;
30083        __struct.lat = buf.get_i32_le()?;
30084        __struct.lon = buf.get_i32_le()?;
30085        __struct.grid_spacing = buf.get_u16_le()?;
30086        Ok(__struct)
30087    }
30088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30089        let mut __tmp = BytesMut::new(bytes);
30090        #[allow(clippy::absurd_extreme_comparisons)]
30091        #[allow(unused_comparisons)]
30092        if __tmp.remaining() < Self::ENCODED_LEN {
30093            panic!(
30094                "buffer is too small (need {} bytes, but got {})",
30095                Self::ENCODED_LEN,
30096                __tmp.remaining(),
30097            )
30098        }
30099        __tmp.put_u64_le(self.mask);
30100        __tmp.put_i32_le(self.lat);
30101        __tmp.put_i32_le(self.lon);
30102        __tmp.put_u16_le(self.grid_spacing);
30103        if matches!(version, MavlinkVersion::V2) {
30104            let len = __tmp.len();
30105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30106        } else {
30107            __tmp.len()
30108        }
30109    }
30110}
30111#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30112#[doc = ""]
30113#[doc = "ID: 111"]
30114#[derive(Debug, Clone, PartialEq)]
30115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30117#[cfg_attr(feature = "ts", derive(TS))]
30118#[cfg_attr(feature = "ts", ts(export))]
30119pub struct TIMESYNC_DATA {
30120    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30121    pub tc1: i64,
30122    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30123    pub ts1: i64,
30124    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30126    pub target_system: u8,
30127    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30128    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30129    pub target_component: u8,
30130}
30131impl TIMESYNC_DATA {
30132    pub const ENCODED_LEN: usize = 18usize;
30133    pub const DEFAULT: Self = Self {
30134        tc1: 0_i64,
30135        ts1: 0_i64,
30136        target_system: 0_u8,
30137        target_component: 0_u8,
30138    };
30139    #[cfg(feature = "arbitrary")]
30140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30141        use arbitrary::{Arbitrary, Unstructured};
30142        let mut buf = [0u8; 1024];
30143        rng.fill_bytes(&mut buf);
30144        let mut unstructured = Unstructured::new(&buf);
30145        Self::arbitrary(&mut unstructured).unwrap_or_default()
30146    }
30147}
30148impl Default for TIMESYNC_DATA {
30149    fn default() -> Self {
30150        Self::DEFAULT.clone()
30151    }
30152}
30153impl MessageData for TIMESYNC_DATA {
30154    type Message = MavMessage;
30155    const ID: u32 = 111u32;
30156    const NAME: &'static str = "TIMESYNC";
30157    const EXTRA_CRC: u8 = 34u8;
30158    const ENCODED_LEN: usize = 18usize;
30159    fn deser(
30160        _version: MavlinkVersion,
30161        __input: &[u8],
30162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30163        let avail_len = __input.len();
30164        let mut payload_buf = [0; Self::ENCODED_LEN];
30165        let mut buf = if avail_len < Self::ENCODED_LEN {
30166            payload_buf[0..avail_len].copy_from_slice(__input);
30167            Bytes::new(&payload_buf)
30168        } else {
30169            Bytes::new(__input)
30170        };
30171        let mut __struct = Self::default();
30172        __struct.tc1 = buf.get_i64_le()?;
30173        __struct.ts1 = buf.get_i64_le()?;
30174        __struct.target_system = buf.get_u8()?;
30175        __struct.target_component = buf.get_u8()?;
30176        Ok(__struct)
30177    }
30178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30179        let mut __tmp = BytesMut::new(bytes);
30180        #[allow(clippy::absurd_extreme_comparisons)]
30181        #[allow(unused_comparisons)]
30182        if __tmp.remaining() < Self::ENCODED_LEN {
30183            panic!(
30184                "buffer is too small (need {} bytes, but got {})",
30185                Self::ENCODED_LEN,
30186                __tmp.remaining(),
30187            )
30188        }
30189        __tmp.put_i64_le(self.tc1);
30190        __tmp.put_i64_le(self.ts1);
30191        if matches!(version, MavlinkVersion::V2) {
30192            __tmp.put_u8(self.target_system);
30193            __tmp.put_u8(self.target_component);
30194            let len = __tmp.len();
30195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30196        } else {
30197            __tmp.len()
30198        }
30199    }
30200}
30201#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30202#[doc = ""]
30203#[doc = "ID: 380"]
30204#[derive(Debug, Clone, PartialEq)]
30205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30207#[cfg_attr(feature = "ts", derive(TS))]
30208#[cfg_attr(feature = "ts", ts(export))]
30209pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30210    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30211    pub safe_return: i32,
30212    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30213    pub land: i32,
30214    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30215    pub mission_next_item: i32,
30216    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30217    pub mission_end: i32,
30218    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30219    pub commanded_action: i32,
30220}
30221impl TIME_ESTIMATE_TO_TARGET_DATA {
30222    pub const ENCODED_LEN: usize = 20usize;
30223    pub const DEFAULT: Self = Self {
30224        safe_return: 0_i32,
30225        land: 0_i32,
30226        mission_next_item: 0_i32,
30227        mission_end: 0_i32,
30228        commanded_action: 0_i32,
30229    };
30230    #[cfg(feature = "arbitrary")]
30231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30232        use arbitrary::{Arbitrary, Unstructured};
30233        let mut buf = [0u8; 1024];
30234        rng.fill_bytes(&mut buf);
30235        let mut unstructured = Unstructured::new(&buf);
30236        Self::arbitrary(&mut unstructured).unwrap_or_default()
30237    }
30238}
30239impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30240    fn default() -> Self {
30241        Self::DEFAULT.clone()
30242    }
30243}
30244impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30245    type Message = MavMessage;
30246    const ID: u32 = 380u32;
30247    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30248    const EXTRA_CRC: u8 = 232u8;
30249    const ENCODED_LEN: usize = 20usize;
30250    fn deser(
30251        _version: MavlinkVersion,
30252        __input: &[u8],
30253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30254        let avail_len = __input.len();
30255        let mut payload_buf = [0; Self::ENCODED_LEN];
30256        let mut buf = if avail_len < Self::ENCODED_LEN {
30257            payload_buf[0..avail_len].copy_from_slice(__input);
30258            Bytes::new(&payload_buf)
30259        } else {
30260            Bytes::new(__input)
30261        };
30262        let mut __struct = Self::default();
30263        __struct.safe_return = buf.get_i32_le()?;
30264        __struct.land = buf.get_i32_le()?;
30265        __struct.mission_next_item = buf.get_i32_le()?;
30266        __struct.mission_end = buf.get_i32_le()?;
30267        __struct.commanded_action = buf.get_i32_le()?;
30268        Ok(__struct)
30269    }
30270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30271        let mut __tmp = BytesMut::new(bytes);
30272        #[allow(clippy::absurd_extreme_comparisons)]
30273        #[allow(unused_comparisons)]
30274        if __tmp.remaining() < Self::ENCODED_LEN {
30275            panic!(
30276                "buffer is too small (need {} bytes, but got {})",
30277                Self::ENCODED_LEN,
30278                __tmp.remaining(),
30279            )
30280        }
30281        __tmp.put_i32_le(self.safe_return);
30282        __tmp.put_i32_le(self.land);
30283        __tmp.put_i32_le(self.mission_next_item);
30284        __tmp.put_i32_le(self.mission_end);
30285        __tmp.put_i32_le(self.commanded_action);
30286        if matches!(version, MavlinkVersion::V2) {
30287            let len = __tmp.len();
30288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30289        } else {
30290            __tmp.len()
30291        }
30292    }
30293}
30294#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30295#[doc = ""]
30296#[doc = "ID: 333"]
30297#[derive(Debug, Clone, PartialEq)]
30298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30300#[cfg_attr(feature = "ts", derive(TS))]
30301#[cfg_attr(feature = "ts", ts(export))]
30302pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30303    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30304    pub time_usec: u64,
30305    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30308    pub pos_x: [f32; 5],
30309    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30311    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30312    pub pos_y: [f32; 5],
30313    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30316    pub pos_z: [f32; 5],
30317    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30319    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30320    pub delta: [f32; 5],
30321    #[doc = "Yaw. Set to NaN for unchanged"]
30322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30324    pub pos_yaw: [f32; 5],
30325    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30326    pub valid_points: u8,
30327}
30328impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30329    pub const ENCODED_LEN: usize = 109usize;
30330    pub const DEFAULT: Self = Self {
30331        time_usec: 0_u64,
30332        pos_x: [0.0_f32; 5usize],
30333        pos_y: [0.0_f32; 5usize],
30334        pos_z: [0.0_f32; 5usize],
30335        delta: [0.0_f32; 5usize],
30336        pos_yaw: [0.0_f32; 5usize],
30337        valid_points: 0_u8,
30338    };
30339    #[cfg(feature = "arbitrary")]
30340    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30341        use arbitrary::{Arbitrary, Unstructured};
30342        let mut buf = [0u8; 1024];
30343        rng.fill_bytes(&mut buf);
30344        let mut unstructured = Unstructured::new(&buf);
30345        Self::arbitrary(&mut unstructured).unwrap_or_default()
30346    }
30347}
30348impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30349    fn default() -> Self {
30350        Self::DEFAULT.clone()
30351    }
30352}
30353impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30354    type Message = MavMessage;
30355    const ID: u32 = 333u32;
30356    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30357    const EXTRA_CRC: u8 = 231u8;
30358    const ENCODED_LEN: usize = 109usize;
30359    fn deser(
30360        _version: MavlinkVersion,
30361        __input: &[u8],
30362    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30363        let avail_len = __input.len();
30364        let mut payload_buf = [0; Self::ENCODED_LEN];
30365        let mut buf = if avail_len < Self::ENCODED_LEN {
30366            payload_buf[0..avail_len].copy_from_slice(__input);
30367            Bytes::new(&payload_buf)
30368        } else {
30369            Bytes::new(__input)
30370        };
30371        let mut __struct = Self::default();
30372        __struct.time_usec = buf.get_u64_le()?;
30373        for v in &mut __struct.pos_x {
30374            let val = buf.get_f32_le()?;
30375            *v = val;
30376        }
30377        for v in &mut __struct.pos_y {
30378            let val = buf.get_f32_le()?;
30379            *v = val;
30380        }
30381        for v in &mut __struct.pos_z {
30382            let val = buf.get_f32_le()?;
30383            *v = val;
30384        }
30385        for v in &mut __struct.delta {
30386            let val = buf.get_f32_le()?;
30387            *v = val;
30388        }
30389        for v in &mut __struct.pos_yaw {
30390            let val = buf.get_f32_le()?;
30391            *v = val;
30392        }
30393        __struct.valid_points = buf.get_u8()?;
30394        Ok(__struct)
30395    }
30396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30397        let mut __tmp = BytesMut::new(bytes);
30398        #[allow(clippy::absurd_extreme_comparisons)]
30399        #[allow(unused_comparisons)]
30400        if __tmp.remaining() < Self::ENCODED_LEN {
30401            panic!(
30402                "buffer is too small (need {} bytes, but got {})",
30403                Self::ENCODED_LEN,
30404                __tmp.remaining(),
30405            )
30406        }
30407        __tmp.put_u64_le(self.time_usec);
30408        for val in &self.pos_x {
30409            __tmp.put_f32_le(*val);
30410        }
30411        for val in &self.pos_y {
30412            __tmp.put_f32_le(*val);
30413        }
30414        for val in &self.pos_z {
30415            __tmp.put_f32_le(*val);
30416        }
30417        for val in &self.delta {
30418            __tmp.put_f32_le(*val);
30419        }
30420        for val in &self.pos_yaw {
30421            __tmp.put_f32_le(*val);
30422        }
30423        __tmp.put_u8(self.valid_points);
30424        if matches!(version, MavlinkVersion::V2) {
30425            let len = __tmp.len();
30426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30427        } else {
30428            __tmp.len()
30429        }
30430    }
30431}
30432#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30433#[doc = ""]
30434#[doc = "ID: 332"]
30435#[derive(Debug, Clone, PartialEq)]
30436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30438#[cfg_attr(feature = "ts", derive(TS))]
30439#[cfg_attr(feature = "ts", ts(export))]
30440pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30441    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30442    pub time_usec: u64,
30443    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30446    pub pos_x: [f32; 5],
30447    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30450    pub pos_y: [f32; 5],
30451    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30454    pub pos_z: [f32; 5],
30455    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30458    pub vel_x: [f32; 5],
30459    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30461    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30462    pub vel_y: [f32; 5],
30463    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30466    pub vel_z: [f32; 5],
30467    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30470    pub acc_x: [f32; 5],
30471    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30474    pub acc_y: [f32; 5],
30475    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30478    pub acc_z: [f32; 5],
30479    #[doc = "Yaw angle, set to NaN if not being used"]
30480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30482    pub pos_yaw: [f32; 5],
30483    #[doc = "Yaw rate, set to NaN if not being used"]
30484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30486    pub vel_yaw: [f32; 5],
30487    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30489    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30490    pub command: [u16; 5],
30491    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30492    pub valid_points: u8,
30493}
30494impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30495    pub const ENCODED_LEN: usize = 239usize;
30496    pub const DEFAULT: Self = Self {
30497        time_usec: 0_u64,
30498        pos_x: [0.0_f32; 5usize],
30499        pos_y: [0.0_f32; 5usize],
30500        pos_z: [0.0_f32; 5usize],
30501        vel_x: [0.0_f32; 5usize],
30502        vel_y: [0.0_f32; 5usize],
30503        vel_z: [0.0_f32; 5usize],
30504        acc_x: [0.0_f32; 5usize],
30505        acc_y: [0.0_f32; 5usize],
30506        acc_z: [0.0_f32; 5usize],
30507        pos_yaw: [0.0_f32; 5usize],
30508        vel_yaw: [0.0_f32; 5usize],
30509        command: [0_u16; 5usize],
30510        valid_points: 0_u8,
30511    };
30512    #[cfg(feature = "arbitrary")]
30513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30514        use arbitrary::{Arbitrary, Unstructured};
30515        let mut buf = [0u8; 1024];
30516        rng.fill_bytes(&mut buf);
30517        let mut unstructured = Unstructured::new(&buf);
30518        Self::arbitrary(&mut unstructured).unwrap_or_default()
30519    }
30520}
30521impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30522    fn default() -> Self {
30523        Self::DEFAULT.clone()
30524    }
30525}
30526impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30527    type Message = MavMessage;
30528    const ID: u32 = 332u32;
30529    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30530    const EXTRA_CRC: u8 = 236u8;
30531    const ENCODED_LEN: usize = 239usize;
30532    fn deser(
30533        _version: MavlinkVersion,
30534        __input: &[u8],
30535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30536        let avail_len = __input.len();
30537        let mut payload_buf = [0; Self::ENCODED_LEN];
30538        let mut buf = if avail_len < Self::ENCODED_LEN {
30539            payload_buf[0..avail_len].copy_from_slice(__input);
30540            Bytes::new(&payload_buf)
30541        } else {
30542            Bytes::new(__input)
30543        };
30544        let mut __struct = Self::default();
30545        __struct.time_usec = buf.get_u64_le()?;
30546        for v in &mut __struct.pos_x {
30547            let val = buf.get_f32_le()?;
30548            *v = val;
30549        }
30550        for v in &mut __struct.pos_y {
30551            let val = buf.get_f32_le()?;
30552            *v = val;
30553        }
30554        for v in &mut __struct.pos_z {
30555            let val = buf.get_f32_le()?;
30556            *v = val;
30557        }
30558        for v in &mut __struct.vel_x {
30559            let val = buf.get_f32_le()?;
30560            *v = val;
30561        }
30562        for v in &mut __struct.vel_y {
30563            let val = buf.get_f32_le()?;
30564            *v = val;
30565        }
30566        for v in &mut __struct.vel_z {
30567            let val = buf.get_f32_le()?;
30568            *v = val;
30569        }
30570        for v in &mut __struct.acc_x {
30571            let val = buf.get_f32_le()?;
30572            *v = val;
30573        }
30574        for v in &mut __struct.acc_y {
30575            let val = buf.get_f32_le()?;
30576            *v = val;
30577        }
30578        for v in &mut __struct.acc_z {
30579            let val = buf.get_f32_le()?;
30580            *v = val;
30581        }
30582        for v in &mut __struct.pos_yaw {
30583            let val = buf.get_f32_le()?;
30584            *v = val;
30585        }
30586        for v in &mut __struct.vel_yaw {
30587            let val = buf.get_f32_le()?;
30588            *v = val;
30589        }
30590        for v in &mut __struct.command {
30591            let val = buf.get_u16_le()?;
30592            *v = val;
30593        }
30594        __struct.valid_points = buf.get_u8()?;
30595        Ok(__struct)
30596    }
30597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30598        let mut __tmp = BytesMut::new(bytes);
30599        #[allow(clippy::absurd_extreme_comparisons)]
30600        #[allow(unused_comparisons)]
30601        if __tmp.remaining() < Self::ENCODED_LEN {
30602            panic!(
30603                "buffer is too small (need {} bytes, but got {})",
30604                Self::ENCODED_LEN,
30605                __tmp.remaining(),
30606            )
30607        }
30608        __tmp.put_u64_le(self.time_usec);
30609        for val in &self.pos_x {
30610            __tmp.put_f32_le(*val);
30611        }
30612        for val in &self.pos_y {
30613            __tmp.put_f32_le(*val);
30614        }
30615        for val in &self.pos_z {
30616            __tmp.put_f32_le(*val);
30617        }
30618        for val in &self.vel_x {
30619            __tmp.put_f32_le(*val);
30620        }
30621        for val in &self.vel_y {
30622            __tmp.put_f32_le(*val);
30623        }
30624        for val in &self.vel_z {
30625            __tmp.put_f32_le(*val);
30626        }
30627        for val in &self.acc_x {
30628            __tmp.put_f32_le(*val);
30629        }
30630        for val in &self.acc_y {
30631            __tmp.put_f32_le(*val);
30632        }
30633        for val in &self.acc_z {
30634            __tmp.put_f32_le(*val);
30635        }
30636        for val in &self.pos_yaw {
30637            __tmp.put_f32_le(*val);
30638        }
30639        for val in &self.vel_yaw {
30640            __tmp.put_f32_le(*val);
30641        }
30642        for val in &self.command {
30643            __tmp.put_u16_le(*val);
30644        }
30645        __tmp.put_u8(self.valid_points);
30646        if matches!(version, MavlinkVersion::V2) {
30647            let len = __tmp.len();
30648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30649        } else {
30650            __tmp.len()
30651        }
30652    }
30653}
30654#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30655#[doc = ""]
30656#[doc = "ID: 385"]
30657#[derive(Debug, Clone, PartialEq)]
30658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30660#[cfg_attr(feature = "ts", derive(TS))]
30661#[cfg_attr(feature = "ts", ts(export))]
30662pub struct TUNNEL_DATA {
30663    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30664    pub payload_type: MavTunnelPayloadType,
30665    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30666    pub target_system: u8,
30667    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30668    pub target_component: u8,
30669    #[doc = "Length of the data transported in payload"]
30670    pub payload_length: u8,
30671    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30673    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30674    pub payload: [u8; 128],
30675}
30676impl TUNNEL_DATA {
30677    pub const ENCODED_LEN: usize = 133usize;
30678    pub const DEFAULT: Self = Self {
30679        payload_type: MavTunnelPayloadType::DEFAULT,
30680        target_system: 0_u8,
30681        target_component: 0_u8,
30682        payload_length: 0_u8,
30683        payload: [0_u8; 128usize],
30684    };
30685    #[cfg(feature = "arbitrary")]
30686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30687        use arbitrary::{Arbitrary, Unstructured};
30688        let mut buf = [0u8; 1024];
30689        rng.fill_bytes(&mut buf);
30690        let mut unstructured = Unstructured::new(&buf);
30691        Self::arbitrary(&mut unstructured).unwrap_or_default()
30692    }
30693}
30694impl Default for TUNNEL_DATA {
30695    fn default() -> Self {
30696        Self::DEFAULT.clone()
30697    }
30698}
30699impl MessageData for TUNNEL_DATA {
30700    type Message = MavMessage;
30701    const ID: u32 = 385u32;
30702    const NAME: &'static str = "TUNNEL";
30703    const EXTRA_CRC: u8 = 147u8;
30704    const ENCODED_LEN: usize = 133usize;
30705    fn deser(
30706        _version: MavlinkVersion,
30707        __input: &[u8],
30708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30709        let avail_len = __input.len();
30710        let mut payload_buf = [0; Self::ENCODED_LEN];
30711        let mut buf = if avail_len < Self::ENCODED_LEN {
30712            payload_buf[0..avail_len].copy_from_slice(__input);
30713            Bytes::new(&payload_buf)
30714        } else {
30715            Bytes::new(__input)
30716        };
30717        let mut __struct = Self::default();
30718        let tmp = buf.get_u16_le()?;
30719        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30720            ::mavlink_core::error::ParserError::InvalidEnum {
30721                enum_type: "MavTunnelPayloadType",
30722                value: tmp as u64,
30723            },
30724        )?;
30725        __struct.target_system = buf.get_u8()?;
30726        __struct.target_component = buf.get_u8()?;
30727        __struct.payload_length = buf.get_u8()?;
30728        for v in &mut __struct.payload {
30729            let val = buf.get_u8()?;
30730            *v = val;
30731        }
30732        Ok(__struct)
30733    }
30734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30735        let mut __tmp = BytesMut::new(bytes);
30736        #[allow(clippy::absurd_extreme_comparisons)]
30737        #[allow(unused_comparisons)]
30738        if __tmp.remaining() < Self::ENCODED_LEN {
30739            panic!(
30740                "buffer is too small (need {} bytes, but got {})",
30741                Self::ENCODED_LEN,
30742                __tmp.remaining(),
30743            )
30744        }
30745        __tmp.put_u16_le(self.payload_type as u16);
30746        __tmp.put_u8(self.target_system);
30747        __tmp.put_u8(self.target_component);
30748        __tmp.put_u8(self.payload_length);
30749        for val in &self.payload {
30750            __tmp.put_u8(*val);
30751        }
30752        if matches!(version, MavlinkVersion::V2) {
30753            let len = __tmp.len();
30754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30755        } else {
30756            __tmp.len()
30757        }
30758    }
30759}
30760#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30761#[doc = ""]
30762#[doc = "ID: 311"]
30763#[derive(Debug, Clone, PartialEq)]
30764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30766#[cfg_attr(feature = "ts", derive(TS))]
30767#[cfg_attr(feature = "ts", ts(export))]
30768pub struct UAVCAN_NODE_INFO_DATA {
30769    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30770    pub time_usec: u64,
30771    #[doc = "Time since the start-up of the node."]
30772    pub uptime_sec: u32,
30773    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30774    pub sw_vcs_commit: u32,
30775    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30776    #[cfg_attr(feature = "ts", ts(type = "string"))]
30777    pub name: CharArray<80>,
30778    #[doc = "Hardware major version number."]
30779    pub hw_version_major: u8,
30780    #[doc = "Hardware minor version number."]
30781    pub hw_version_minor: u8,
30782    #[doc = "Hardware unique 128-bit ID."]
30783    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30784    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30785    pub hw_unique_id: [u8; 16],
30786    #[doc = "Software major version number."]
30787    pub sw_version_major: u8,
30788    #[doc = "Software minor version number."]
30789    pub sw_version_minor: u8,
30790}
30791impl UAVCAN_NODE_INFO_DATA {
30792    pub const ENCODED_LEN: usize = 116usize;
30793    pub const DEFAULT: Self = Self {
30794        time_usec: 0_u64,
30795        uptime_sec: 0_u32,
30796        sw_vcs_commit: 0_u32,
30797        name: CharArray::new([0_u8; 80usize]),
30798        hw_version_major: 0_u8,
30799        hw_version_minor: 0_u8,
30800        hw_unique_id: [0_u8; 16usize],
30801        sw_version_major: 0_u8,
30802        sw_version_minor: 0_u8,
30803    };
30804    #[cfg(feature = "arbitrary")]
30805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30806        use arbitrary::{Arbitrary, Unstructured};
30807        let mut buf = [0u8; 1024];
30808        rng.fill_bytes(&mut buf);
30809        let mut unstructured = Unstructured::new(&buf);
30810        Self::arbitrary(&mut unstructured).unwrap_or_default()
30811    }
30812}
30813impl Default for UAVCAN_NODE_INFO_DATA {
30814    fn default() -> Self {
30815        Self::DEFAULT.clone()
30816    }
30817}
30818impl MessageData for UAVCAN_NODE_INFO_DATA {
30819    type Message = MavMessage;
30820    const ID: u32 = 311u32;
30821    const NAME: &'static str = "UAVCAN_NODE_INFO";
30822    const EXTRA_CRC: u8 = 95u8;
30823    const ENCODED_LEN: usize = 116usize;
30824    fn deser(
30825        _version: MavlinkVersion,
30826        __input: &[u8],
30827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30828        let avail_len = __input.len();
30829        let mut payload_buf = [0; Self::ENCODED_LEN];
30830        let mut buf = if avail_len < Self::ENCODED_LEN {
30831            payload_buf[0..avail_len].copy_from_slice(__input);
30832            Bytes::new(&payload_buf)
30833        } else {
30834            Bytes::new(__input)
30835        };
30836        let mut __struct = Self::default();
30837        __struct.time_usec = buf.get_u64_le()?;
30838        __struct.uptime_sec = buf.get_u32_le()?;
30839        __struct.sw_vcs_commit = buf.get_u32_le()?;
30840        let mut tmp = [0_u8; 80usize];
30841        for v in &mut tmp {
30842            *v = buf.get_u8()?;
30843        }
30844        __struct.name = CharArray::new(tmp);
30845        __struct.hw_version_major = buf.get_u8()?;
30846        __struct.hw_version_minor = buf.get_u8()?;
30847        for v in &mut __struct.hw_unique_id {
30848            let val = buf.get_u8()?;
30849            *v = val;
30850        }
30851        __struct.sw_version_major = buf.get_u8()?;
30852        __struct.sw_version_minor = buf.get_u8()?;
30853        Ok(__struct)
30854    }
30855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30856        let mut __tmp = BytesMut::new(bytes);
30857        #[allow(clippy::absurd_extreme_comparisons)]
30858        #[allow(unused_comparisons)]
30859        if __tmp.remaining() < Self::ENCODED_LEN {
30860            panic!(
30861                "buffer is too small (need {} bytes, but got {})",
30862                Self::ENCODED_LEN,
30863                __tmp.remaining(),
30864            )
30865        }
30866        __tmp.put_u64_le(self.time_usec);
30867        __tmp.put_u32_le(self.uptime_sec);
30868        __tmp.put_u32_le(self.sw_vcs_commit);
30869        for val in &self.name {
30870            __tmp.put_u8(*val);
30871        }
30872        __tmp.put_u8(self.hw_version_major);
30873        __tmp.put_u8(self.hw_version_minor);
30874        for val in &self.hw_unique_id {
30875            __tmp.put_u8(*val);
30876        }
30877        __tmp.put_u8(self.sw_version_major);
30878        __tmp.put_u8(self.sw_version_minor);
30879        if matches!(version, MavlinkVersion::V2) {
30880            let len = __tmp.len();
30881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30882        } else {
30883            __tmp.len()
30884        }
30885    }
30886}
30887#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30888#[doc = ""]
30889#[doc = "ID: 310"]
30890#[derive(Debug, Clone, PartialEq)]
30891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30893#[cfg_attr(feature = "ts", derive(TS))]
30894#[cfg_attr(feature = "ts", ts(export))]
30895pub struct UAVCAN_NODE_STATUS_DATA {
30896    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30897    pub time_usec: u64,
30898    #[doc = "Time since the start-up of the node."]
30899    pub uptime_sec: u32,
30900    #[doc = "Vendor-specific status information."]
30901    pub vendor_specific_status_code: u16,
30902    #[doc = "Generalized node health status."]
30903    pub health: UavcanNodeHealth,
30904    #[doc = "Generalized operating mode."]
30905    pub mode: UavcanNodeMode,
30906    #[doc = "Not used currently."]
30907    pub sub_mode: u8,
30908}
30909impl UAVCAN_NODE_STATUS_DATA {
30910    pub const ENCODED_LEN: usize = 17usize;
30911    pub const DEFAULT: Self = Self {
30912        time_usec: 0_u64,
30913        uptime_sec: 0_u32,
30914        vendor_specific_status_code: 0_u16,
30915        health: UavcanNodeHealth::DEFAULT,
30916        mode: UavcanNodeMode::DEFAULT,
30917        sub_mode: 0_u8,
30918    };
30919    #[cfg(feature = "arbitrary")]
30920    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30921        use arbitrary::{Arbitrary, Unstructured};
30922        let mut buf = [0u8; 1024];
30923        rng.fill_bytes(&mut buf);
30924        let mut unstructured = Unstructured::new(&buf);
30925        Self::arbitrary(&mut unstructured).unwrap_or_default()
30926    }
30927}
30928impl Default for UAVCAN_NODE_STATUS_DATA {
30929    fn default() -> Self {
30930        Self::DEFAULT.clone()
30931    }
30932}
30933impl MessageData for UAVCAN_NODE_STATUS_DATA {
30934    type Message = MavMessage;
30935    const ID: u32 = 310u32;
30936    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30937    const EXTRA_CRC: u8 = 28u8;
30938    const ENCODED_LEN: usize = 17usize;
30939    fn deser(
30940        _version: MavlinkVersion,
30941        __input: &[u8],
30942    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30943        let avail_len = __input.len();
30944        let mut payload_buf = [0; Self::ENCODED_LEN];
30945        let mut buf = if avail_len < Self::ENCODED_LEN {
30946            payload_buf[0..avail_len].copy_from_slice(__input);
30947            Bytes::new(&payload_buf)
30948        } else {
30949            Bytes::new(__input)
30950        };
30951        let mut __struct = Self::default();
30952        __struct.time_usec = buf.get_u64_le()?;
30953        __struct.uptime_sec = buf.get_u32_le()?;
30954        __struct.vendor_specific_status_code = buf.get_u16_le()?;
30955        let tmp = buf.get_u8()?;
30956        __struct.health =
30957            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30958                enum_type: "UavcanNodeHealth",
30959                value: tmp as u64,
30960            })?;
30961        let tmp = buf.get_u8()?;
30962        __struct.mode =
30963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30964                enum_type: "UavcanNodeMode",
30965                value: tmp as u64,
30966            })?;
30967        __struct.sub_mode = buf.get_u8()?;
30968        Ok(__struct)
30969    }
30970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30971        let mut __tmp = BytesMut::new(bytes);
30972        #[allow(clippy::absurd_extreme_comparisons)]
30973        #[allow(unused_comparisons)]
30974        if __tmp.remaining() < Self::ENCODED_LEN {
30975            panic!(
30976                "buffer is too small (need {} bytes, but got {})",
30977                Self::ENCODED_LEN,
30978                __tmp.remaining(),
30979            )
30980        }
30981        __tmp.put_u64_le(self.time_usec);
30982        __tmp.put_u32_le(self.uptime_sec);
30983        __tmp.put_u16_le(self.vendor_specific_status_code);
30984        __tmp.put_u8(self.health as u8);
30985        __tmp.put_u8(self.mode as u8);
30986        __tmp.put_u8(self.sub_mode);
30987        if matches!(version, MavlinkVersion::V2) {
30988            let len = __tmp.len();
30989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30990        } else {
30991            __tmp.len()
30992        }
30993    }
30994}
30995#[doc = "The global position resulting from GPS and sensor fusion."]
30996#[doc = ""]
30997#[doc = "ID: 340"]
30998#[derive(Debug, Clone, PartialEq)]
30999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31001#[cfg_attr(feature = "ts", derive(TS))]
31002#[cfg_attr(feature = "ts", ts(export))]
31003pub struct UTM_GLOBAL_POSITION_DATA {
31004    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31005    pub time: u64,
31006    #[doc = "Latitude (WGS84)"]
31007    pub lat: i32,
31008    #[doc = "Longitude (WGS84)"]
31009    pub lon: i32,
31010    #[doc = "Altitude (WGS84)"]
31011    pub alt: i32,
31012    #[doc = "Altitude above ground"]
31013    pub relative_alt: i32,
31014    #[doc = "Next waypoint, latitude (WGS84)"]
31015    pub next_lat: i32,
31016    #[doc = "Next waypoint, longitude (WGS84)"]
31017    pub next_lon: i32,
31018    #[doc = "Next waypoint, altitude (WGS84)"]
31019    pub next_alt: i32,
31020    #[doc = "Ground X speed (latitude, positive north)"]
31021    pub vx: i16,
31022    #[doc = "Ground Y speed (longitude, positive east)"]
31023    pub vy: i16,
31024    #[doc = "Ground Z speed (altitude, positive down)"]
31025    pub vz: i16,
31026    #[doc = "Horizontal position uncertainty (standard deviation)"]
31027    pub h_acc: u16,
31028    #[doc = "Altitude uncertainty (standard deviation)"]
31029    pub v_acc: u16,
31030    #[doc = "Speed uncertainty (standard deviation)"]
31031    pub vel_acc: u16,
31032    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31033    pub update_rate: u16,
31034    #[doc = "Unique UAS ID."]
31035    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31036    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31037    pub uas_id: [u8; 18],
31038    #[doc = "Flight state"]
31039    pub flight_state: UtmFlightState,
31040    #[doc = "Bitwise OR combination of the data available flags."]
31041    pub flags: UtmDataAvailFlags,
31042}
31043impl UTM_GLOBAL_POSITION_DATA {
31044    pub const ENCODED_LEN: usize = 70usize;
31045    pub const DEFAULT: Self = Self {
31046        time: 0_u64,
31047        lat: 0_i32,
31048        lon: 0_i32,
31049        alt: 0_i32,
31050        relative_alt: 0_i32,
31051        next_lat: 0_i32,
31052        next_lon: 0_i32,
31053        next_alt: 0_i32,
31054        vx: 0_i16,
31055        vy: 0_i16,
31056        vz: 0_i16,
31057        h_acc: 0_u16,
31058        v_acc: 0_u16,
31059        vel_acc: 0_u16,
31060        update_rate: 0_u16,
31061        uas_id: [0_u8; 18usize],
31062        flight_state: UtmFlightState::DEFAULT,
31063        flags: UtmDataAvailFlags::DEFAULT,
31064    };
31065    #[cfg(feature = "arbitrary")]
31066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31067        use arbitrary::{Arbitrary, Unstructured};
31068        let mut buf = [0u8; 1024];
31069        rng.fill_bytes(&mut buf);
31070        let mut unstructured = Unstructured::new(&buf);
31071        Self::arbitrary(&mut unstructured).unwrap_or_default()
31072    }
31073}
31074impl Default for UTM_GLOBAL_POSITION_DATA {
31075    fn default() -> Self {
31076        Self::DEFAULT.clone()
31077    }
31078}
31079impl MessageData for UTM_GLOBAL_POSITION_DATA {
31080    type Message = MavMessage;
31081    const ID: u32 = 340u32;
31082    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31083    const EXTRA_CRC: u8 = 99u8;
31084    const ENCODED_LEN: usize = 70usize;
31085    fn deser(
31086        _version: MavlinkVersion,
31087        __input: &[u8],
31088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31089        let avail_len = __input.len();
31090        let mut payload_buf = [0; Self::ENCODED_LEN];
31091        let mut buf = if avail_len < Self::ENCODED_LEN {
31092            payload_buf[0..avail_len].copy_from_slice(__input);
31093            Bytes::new(&payload_buf)
31094        } else {
31095            Bytes::new(__input)
31096        };
31097        let mut __struct = Self::default();
31098        __struct.time = buf.get_u64_le()?;
31099        __struct.lat = buf.get_i32_le()?;
31100        __struct.lon = buf.get_i32_le()?;
31101        __struct.alt = buf.get_i32_le()?;
31102        __struct.relative_alt = buf.get_i32_le()?;
31103        __struct.next_lat = buf.get_i32_le()?;
31104        __struct.next_lon = buf.get_i32_le()?;
31105        __struct.next_alt = buf.get_i32_le()?;
31106        __struct.vx = buf.get_i16_le()?;
31107        __struct.vy = buf.get_i16_le()?;
31108        __struct.vz = buf.get_i16_le()?;
31109        __struct.h_acc = buf.get_u16_le()?;
31110        __struct.v_acc = buf.get_u16_le()?;
31111        __struct.vel_acc = buf.get_u16_le()?;
31112        __struct.update_rate = buf.get_u16_le()?;
31113        for v in &mut __struct.uas_id {
31114            let val = buf.get_u8()?;
31115            *v = val;
31116        }
31117        let tmp = buf.get_u8()?;
31118        __struct.flight_state =
31119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31120                enum_type: "UtmFlightState",
31121                value: tmp as u64,
31122            })?;
31123        let tmp = buf.get_u8()?;
31124        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31125            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31126                flag_type: "UtmDataAvailFlags",
31127                value: tmp as u64,
31128            })?;
31129        Ok(__struct)
31130    }
31131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31132        let mut __tmp = BytesMut::new(bytes);
31133        #[allow(clippy::absurd_extreme_comparisons)]
31134        #[allow(unused_comparisons)]
31135        if __tmp.remaining() < Self::ENCODED_LEN {
31136            panic!(
31137                "buffer is too small (need {} bytes, but got {})",
31138                Self::ENCODED_LEN,
31139                __tmp.remaining(),
31140            )
31141        }
31142        __tmp.put_u64_le(self.time);
31143        __tmp.put_i32_le(self.lat);
31144        __tmp.put_i32_le(self.lon);
31145        __tmp.put_i32_le(self.alt);
31146        __tmp.put_i32_le(self.relative_alt);
31147        __tmp.put_i32_le(self.next_lat);
31148        __tmp.put_i32_le(self.next_lon);
31149        __tmp.put_i32_le(self.next_alt);
31150        __tmp.put_i16_le(self.vx);
31151        __tmp.put_i16_le(self.vy);
31152        __tmp.put_i16_le(self.vz);
31153        __tmp.put_u16_le(self.h_acc);
31154        __tmp.put_u16_le(self.v_acc);
31155        __tmp.put_u16_le(self.vel_acc);
31156        __tmp.put_u16_le(self.update_rate);
31157        for val in &self.uas_id {
31158            __tmp.put_u8(*val);
31159        }
31160        __tmp.put_u8(self.flight_state as u8);
31161        __tmp.put_u8(self.flags.bits() as u8);
31162        if matches!(version, MavlinkVersion::V2) {
31163            let len = __tmp.len();
31164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31165        } else {
31166            __tmp.len()
31167        }
31168    }
31169}
31170#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31171#[doc = ""]
31172#[doc = "ID: 248"]
31173#[derive(Debug, Clone, PartialEq)]
31174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31176#[cfg_attr(feature = "ts", derive(TS))]
31177#[cfg_attr(feature = "ts", ts(export))]
31178pub struct V2_EXTENSION_DATA {
31179    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31180    pub message_type: u16,
31181    #[doc = "Network ID (0 for broadcast)"]
31182    pub target_network: u8,
31183    #[doc = "System ID (0 for broadcast)"]
31184    pub target_system: u8,
31185    #[doc = "Component ID (0 for broadcast)"]
31186    pub target_component: u8,
31187    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31190    pub payload: [u8; 249],
31191}
31192impl V2_EXTENSION_DATA {
31193    pub const ENCODED_LEN: usize = 254usize;
31194    pub const DEFAULT: Self = Self {
31195        message_type: 0_u16,
31196        target_network: 0_u8,
31197        target_system: 0_u8,
31198        target_component: 0_u8,
31199        payload: [0_u8; 249usize],
31200    };
31201    #[cfg(feature = "arbitrary")]
31202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31203        use arbitrary::{Arbitrary, Unstructured};
31204        let mut buf = [0u8; 1024];
31205        rng.fill_bytes(&mut buf);
31206        let mut unstructured = Unstructured::new(&buf);
31207        Self::arbitrary(&mut unstructured).unwrap_or_default()
31208    }
31209}
31210impl Default for V2_EXTENSION_DATA {
31211    fn default() -> Self {
31212        Self::DEFAULT.clone()
31213    }
31214}
31215impl MessageData for V2_EXTENSION_DATA {
31216    type Message = MavMessage;
31217    const ID: u32 = 248u32;
31218    const NAME: &'static str = "V2_EXTENSION";
31219    const EXTRA_CRC: u8 = 8u8;
31220    const ENCODED_LEN: usize = 254usize;
31221    fn deser(
31222        _version: MavlinkVersion,
31223        __input: &[u8],
31224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31225        let avail_len = __input.len();
31226        let mut payload_buf = [0; Self::ENCODED_LEN];
31227        let mut buf = if avail_len < Self::ENCODED_LEN {
31228            payload_buf[0..avail_len].copy_from_slice(__input);
31229            Bytes::new(&payload_buf)
31230        } else {
31231            Bytes::new(__input)
31232        };
31233        let mut __struct = Self::default();
31234        __struct.message_type = buf.get_u16_le()?;
31235        __struct.target_network = buf.get_u8()?;
31236        __struct.target_system = buf.get_u8()?;
31237        __struct.target_component = buf.get_u8()?;
31238        for v in &mut __struct.payload {
31239            let val = buf.get_u8()?;
31240            *v = val;
31241        }
31242        Ok(__struct)
31243    }
31244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31245        let mut __tmp = BytesMut::new(bytes);
31246        #[allow(clippy::absurd_extreme_comparisons)]
31247        #[allow(unused_comparisons)]
31248        if __tmp.remaining() < Self::ENCODED_LEN {
31249            panic!(
31250                "buffer is too small (need {} bytes, but got {})",
31251                Self::ENCODED_LEN,
31252                __tmp.remaining(),
31253            )
31254        }
31255        __tmp.put_u16_le(self.message_type);
31256        __tmp.put_u8(self.target_network);
31257        __tmp.put_u8(self.target_system);
31258        __tmp.put_u8(self.target_component);
31259        for val in &self.payload {
31260            __tmp.put_u8(*val);
31261        }
31262        if matches!(version, MavlinkVersion::V2) {
31263            let len = __tmp.len();
31264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31265        } else {
31266            __tmp.len()
31267        }
31268    }
31269}
31270#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31271#[doc = ""]
31272#[doc = "ID: 74"]
31273#[derive(Debug, Clone, PartialEq)]
31274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31276#[cfg_attr(feature = "ts", derive(TS))]
31277#[cfg_attr(feature = "ts", ts(export))]
31278pub struct VFR_HUD_DATA {
31279    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31280    pub airspeed: f32,
31281    #[doc = "Current ground speed."]
31282    pub groundspeed: f32,
31283    #[doc = "Current altitude (MSL)."]
31284    pub alt: f32,
31285    #[doc = "Current climb rate."]
31286    pub climb: f32,
31287    #[doc = "Current heading in compass units (0-360, 0=north)."]
31288    pub heading: i16,
31289    #[doc = "Current throttle setting (0 to 100)."]
31290    pub throttle: u16,
31291}
31292impl VFR_HUD_DATA {
31293    pub const ENCODED_LEN: usize = 20usize;
31294    pub const DEFAULT: Self = Self {
31295        airspeed: 0.0_f32,
31296        groundspeed: 0.0_f32,
31297        alt: 0.0_f32,
31298        climb: 0.0_f32,
31299        heading: 0_i16,
31300        throttle: 0_u16,
31301    };
31302    #[cfg(feature = "arbitrary")]
31303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31304        use arbitrary::{Arbitrary, Unstructured};
31305        let mut buf = [0u8; 1024];
31306        rng.fill_bytes(&mut buf);
31307        let mut unstructured = Unstructured::new(&buf);
31308        Self::arbitrary(&mut unstructured).unwrap_or_default()
31309    }
31310}
31311impl Default for VFR_HUD_DATA {
31312    fn default() -> Self {
31313        Self::DEFAULT.clone()
31314    }
31315}
31316impl MessageData for VFR_HUD_DATA {
31317    type Message = MavMessage;
31318    const ID: u32 = 74u32;
31319    const NAME: &'static str = "VFR_HUD";
31320    const EXTRA_CRC: u8 = 20u8;
31321    const ENCODED_LEN: usize = 20usize;
31322    fn deser(
31323        _version: MavlinkVersion,
31324        __input: &[u8],
31325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31326        let avail_len = __input.len();
31327        let mut payload_buf = [0; Self::ENCODED_LEN];
31328        let mut buf = if avail_len < Self::ENCODED_LEN {
31329            payload_buf[0..avail_len].copy_from_slice(__input);
31330            Bytes::new(&payload_buf)
31331        } else {
31332            Bytes::new(__input)
31333        };
31334        let mut __struct = Self::default();
31335        __struct.airspeed = buf.get_f32_le()?;
31336        __struct.groundspeed = buf.get_f32_le()?;
31337        __struct.alt = buf.get_f32_le()?;
31338        __struct.climb = buf.get_f32_le()?;
31339        __struct.heading = buf.get_i16_le()?;
31340        __struct.throttle = buf.get_u16_le()?;
31341        Ok(__struct)
31342    }
31343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31344        let mut __tmp = BytesMut::new(bytes);
31345        #[allow(clippy::absurd_extreme_comparisons)]
31346        #[allow(unused_comparisons)]
31347        if __tmp.remaining() < Self::ENCODED_LEN {
31348            panic!(
31349                "buffer is too small (need {} bytes, but got {})",
31350                Self::ENCODED_LEN,
31351                __tmp.remaining(),
31352            )
31353        }
31354        __tmp.put_f32_le(self.airspeed);
31355        __tmp.put_f32_le(self.groundspeed);
31356        __tmp.put_f32_le(self.alt);
31357        __tmp.put_f32_le(self.climb);
31358        __tmp.put_i16_le(self.heading);
31359        __tmp.put_u16_le(self.throttle);
31360        if matches!(version, MavlinkVersion::V2) {
31361            let len = __tmp.len();
31362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31363        } else {
31364            __tmp.len()
31365        }
31366    }
31367}
31368#[doc = "Vibration levels and accelerometer clipping."]
31369#[doc = ""]
31370#[doc = "ID: 241"]
31371#[derive(Debug, Clone, PartialEq)]
31372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31374#[cfg_attr(feature = "ts", derive(TS))]
31375#[cfg_attr(feature = "ts", ts(export))]
31376pub struct VIBRATION_DATA {
31377    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31378    pub time_usec: u64,
31379    #[doc = "Vibration levels on X-axis"]
31380    pub vibration_x: f32,
31381    #[doc = "Vibration levels on Y-axis"]
31382    pub vibration_y: f32,
31383    #[doc = "Vibration levels on Z-axis"]
31384    pub vibration_z: f32,
31385    #[doc = "first accelerometer clipping count"]
31386    pub clipping_0: u32,
31387    #[doc = "second accelerometer clipping count"]
31388    pub clipping_1: u32,
31389    #[doc = "third accelerometer clipping count"]
31390    pub clipping_2: u32,
31391}
31392impl VIBRATION_DATA {
31393    pub const ENCODED_LEN: usize = 32usize;
31394    pub const DEFAULT: Self = Self {
31395        time_usec: 0_u64,
31396        vibration_x: 0.0_f32,
31397        vibration_y: 0.0_f32,
31398        vibration_z: 0.0_f32,
31399        clipping_0: 0_u32,
31400        clipping_1: 0_u32,
31401        clipping_2: 0_u32,
31402    };
31403    #[cfg(feature = "arbitrary")]
31404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31405        use arbitrary::{Arbitrary, Unstructured};
31406        let mut buf = [0u8; 1024];
31407        rng.fill_bytes(&mut buf);
31408        let mut unstructured = Unstructured::new(&buf);
31409        Self::arbitrary(&mut unstructured).unwrap_or_default()
31410    }
31411}
31412impl Default for VIBRATION_DATA {
31413    fn default() -> Self {
31414        Self::DEFAULT.clone()
31415    }
31416}
31417impl MessageData for VIBRATION_DATA {
31418    type Message = MavMessage;
31419    const ID: u32 = 241u32;
31420    const NAME: &'static str = "VIBRATION";
31421    const EXTRA_CRC: u8 = 90u8;
31422    const ENCODED_LEN: usize = 32usize;
31423    fn deser(
31424        _version: MavlinkVersion,
31425        __input: &[u8],
31426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31427        let avail_len = __input.len();
31428        let mut payload_buf = [0; Self::ENCODED_LEN];
31429        let mut buf = if avail_len < Self::ENCODED_LEN {
31430            payload_buf[0..avail_len].copy_from_slice(__input);
31431            Bytes::new(&payload_buf)
31432        } else {
31433            Bytes::new(__input)
31434        };
31435        let mut __struct = Self::default();
31436        __struct.time_usec = buf.get_u64_le()?;
31437        __struct.vibration_x = buf.get_f32_le()?;
31438        __struct.vibration_y = buf.get_f32_le()?;
31439        __struct.vibration_z = buf.get_f32_le()?;
31440        __struct.clipping_0 = buf.get_u32_le()?;
31441        __struct.clipping_1 = buf.get_u32_le()?;
31442        __struct.clipping_2 = buf.get_u32_le()?;
31443        Ok(__struct)
31444    }
31445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31446        let mut __tmp = BytesMut::new(bytes);
31447        #[allow(clippy::absurd_extreme_comparisons)]
31448        #[allow(unused_comparisons)]
31449        if __tmp.remaining() < Self::ENCODED_LEN {
31450            panic!(
31451                "buffer is too small (need {} bytes, but got {})",
31452                Self::ENCODED_LEN,
31453                __tmp.remaining(),
31454            )
31455        }
31456        __tmp.put_u64_le(self.time_usec);
31457        __tmp.put_f32_le(self.vibration_x);
31458        __tmp.put_f32_le(self.vibration_y);
31459        __tmp.put_f32_le(self.vibration_z);
31460        __tmp.put_u32_le(self.clipping_0);
31461        __tmp.put_u32_le(self.clipping_1);
31462        __tmp.put_u32_le(self.clipping_2);
31463        if matches!(version, MavlinkVersion::V2) {
31464            let len = __tmp.len();
31465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31466        } else {
31467            __tmp.len()
31468        }
31469    }
31470}
31471#[doc = "Global position estimate from a Vicon motion system source."]
31472#[doc = ""]
31473#[doc = "ID: 104"]
31474#[derive(Debug, Clone, PartialEq)]
31475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31477#[cfg_attr(feature = "ts", derive(TS))]
31478#[cfg_attr(feature = "ts", ts(export))]
31479pub struct VICON_POSITION_ESTIMATE_DATA {
31480    #[doc = "Timestamp (UNIX time or time since system boot)"]
31481    pub usec: u64,
31482    #[doc = "Global X position"]
31483    pub x: f32,
31484    #[doc = "Global Y position"]
31485    pub y: f32,
31486    #[doc = "Global Z position"]
31487    pub z: f32,
31488    #[doc = "Roll angle"]
31489    pub roll: f32,
31490    #[doc = "Pitch angle"]
31491    pub pitch: f32,
31492    #[doc = "Yaw angle"]
31493    pub yaw: f32,
31494    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31495    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31498    pub covariance: [f32; 21],
31499}
31500impl VICON_POSITION_ESTIMATE_DATA {
31501    pub const ENCODED_LEN: usize = 116usize;
31502    pub const DEFAULT: Self = Self {
31503        usec: 0_u64,
31504        x: 0.0_f32,
31505        y: 0.0_f32,
31506        z: 0.0_f32,
31507        roll: 0.0_f32,
31508        pitch: 0.0_f32,
31509        yaw: 0.0_f32,
31510        covariance: [0.0_f32; 21usize],
31511    };
31512    #[cfg(feature = "arbitrary")]
31513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31514        use arbitrary::{Arbitrary, Unstructured};
31515        let mut buf = [0u8; 1024];
31516        rng.fill_bytes(&mut buf);
31517        let mut unstructured = Unstructured::new(&buf);
31518        Self::arbitrary(&mut unstructured).unwrap_or_default()
31519    }
31520}
31521impl Default for VICON_POSITION_ESTIMATE_DATA {
31522    fn default() -> Self {
31523        Self::DEFAULT.clone()
31524    }
31525}
31526impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31527    type Message = MavMessage;
31528    const ID: u32 = 104u32;
31529    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31530    const EXTRA_CRC: u8 = 56u8;
31531    const ENCODED_LEN: usize = 116usize;
31532    fn deser(
31533        _version: MavlinkVersion,
31534        __input: &[u8],
31535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31536        let avail_len = __input.len();
31537        let mut payload_buf = [0; Self::ENCODED_LEN];
31538        let mut buf = if avail_len < Self::ENCODED_LEN {
31539            payload_buf[0..avail_len].copy_from_slice(__input);
31540            Bytes::new(&payload_buf)
31541        } else {
31542            Bytes::new(__input)
31543        };
31544        let mut __struct = Self::default();
31545        __struct.usec = buf.get_u64_le()?;
31546        __struct.x = buf.get_f32_le()?;
31547        __struct.y = buf.get_f32_le()?;
31548        __struct.z = buf.get_f32_le()?;
31549        __struct.roll = buf.get_f32_le()?;
31550        __struct.pitch = buf.get_f32_le()?;
31551        __struct.yaw = buf.get_f32_le()?;
31552        for v in &mut __struct.covariance {
31553            let val = buf.get_f32_le()?;
31554            *v = val;
31555        }
31556        Ok(__struct)
31557    }
31558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31559        let mut __tmp = BytesMut::new(bytes);
31560        #[allow(clippy::absurd_extreme_comparisons)]
31561        #[allow(unused_comparisons)]
31562        if __tmp.remaining() < Self::ENCODED_LEN {
31563            panic!(
31564                "buffer is too small (need {} bytes, but got {})",
31565                Self::ENCODED_LEN,
31566                __tmp.remaining(),
31567            )
31568        }
31569        __tmp.put_u64_le(self.usec);
31570        __tmp.put_f32_le(self.x);
31571        __tmp.put_f32_le(self.y);
31572        __tmp.put_f32_le(self.z);
31573        __tmp.put_f32_le(self.roll);
31574        __tmp.put_f32_le(self.pitch);
31575        __tmp.put_f32_le(self.yaw);
31576        if matches!(version, MavlinkVersion::V2) {
31577            for val in &self.covariance {
31578                __tmp.put_f32_le(*val);
31579            }
31580            let len = __tmp.len();
31581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31582        } else {
31583            __tmp.len()
31584        }
31585    }
31586}
31587#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31588#[doc = ""]
31589#[doc = "ID: 269"]
31590#[derive(Debug, Clone, PartialEq)]
31591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31593#[cfg_attr(feature = "ts", derive(TS))]
31594#[cfg_attr(feature = "ts", ts(export))]
31595pub struct VIDEO_STREAM_INFORMATION_DATA {
31596    #[doc = "Frame rate."]
31597    pub framerate: f32,
31598    #[doc = "Bit rate."]
31599    pub bitrate: u32,
31600    #[doc = "Bitmap of stream status flags."]
31601    pub flags: VideoStreamStatusFlags,
31602    #[doc = "Horizontal resolution."]
31603    pub resolution_h: u16,
31604    #[doc = "Vertical resolution."]
31605    pub resolution_v: u16,
31606    #[doc = "Video image rotation clockwise."]
31607    pub rotation: u16,
31608    #[doc = "Horizontal Field of view."]
31609    pub hfov: u16,
31610    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31611    pub stream_id: u8,
31612    #[doc = "Number of streams available."]
31613    pub count: u8,
31614    #[doc = "Type of stream."]
31615    pub mavtype: VideoStreamType,
31616    #[doc = "Stream name."]
31617    #[cfg_attr(feature = "ts", ts(type = "string"))]
31618    pub name: CharArray<32>,
31619    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31620    #[cfg_attr(feature = "ts", ts(type = "string"))]
31621    pub uri: CharArray<160>,
31622    #[doc = "Encoding of stream."]
31623    #[cfg_attr(feature = "serde", serde(default))]
31624    pub encoding: VideoStreamEncoding,
31625    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31626    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31627    pub camera_device_id: u8,
31628}
31629impl VIDEO_STREAM_INFORMATION_DATA {
31630    pub const ENCODED_LEN: usize = 215usize;
31631    pub const DEFAULT: Self = Self {
31632        framerate: 0.0_f32,
31633        bitrate: 0_u32,
31634        flags: VideoStreamStatusFlags::DEFAULT,
31635        resolution_h: 0_u16,
31636        resolution_v: 0_u16,
31637        rotation: 0_u16,
31638        hfov: 0_u16,
31639        stream_id: 0_u8,
31640        count: 0_u8,
31641        mavtype: VideoStreamType::DEFAULT,
31642        name: CharArray::new([0_u8; 32usize]),
31643        uri: CharArray::new([0_u8; 160usize]),
31644        encoding: VideoStreamEncoding::DEFAULT,
31645        camera_device_id: 0_u8,
31646    };
31647    #[cfg(feature = "arbitrary")]
31648    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31649        use arbitrary::{Arbitrary, Unstructured};
31650        let mut buf = [0u8; 1024];
31651        rng.fill_bytes(&mut buf);
31652        let mut unstructured = Unstructured::new(&buf);
31653        Self::arbitrary(&mut unstructured).unwrap_or_default()
31654    }
31655}
31656impl Default for VIDEO_STREAM_INFORMATION_DATA {
31657    fn default() -> Self {
31658        Self::DEFAULT.clone()
31659    }
31660}
31661impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31662    type Message = MavMessage;
31663    const ID: u32 = 269u32;
31664    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31665    const EXTRA_CRC: u8 = 109u8;
31666    const ENCODED_LEN: usize = 215usize;
31667    fn deser(
31668        _version: MavlinkVersion,
31669        __input: &[u8],
31670    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31671        let avail_len = __input.len();
31672        let mut payload_buf = [0; Self::ENCODED_LEN];
31673        let mut buf = if avail_len < Self::ENCODED_LEN {
31674            payload_buf[0..avail_len].copy_from_slice(__input);
31675            Bytes::new(&payload_buf)
31676        } else {
31677            Bytes::new(__input)
31678        };
31679        let mut __struct = Self::default();
31680        __struct.framerate = buf.get_f32_le()?;
31681        __struct.bitrate = buf.get_u32_le()?;
31682        let tmp = buf.get_u16_le()?;
31683        __struct.flags =
31684            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31685                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31686                    flag_type: "VideoStreamStatusFlags",
31687                    value: tmp as u64,
31688                })?;
31689        __struct.resolution_h = buf.get_u16_le()?;
31690        __struct.resolution_v = buf.get_u16_le()?;
31691        __struct.rotation = buf.get_u16_le()?;
31692        __struct.hfov = buf.get_u16_le()?;
31693        __struct.stream_id = buf.get_u8()?;
31694        __struct.count = buf.get_u8()?;
31695        let tmp = buf.get_u8()?;
31696        __struct.mavtype =
31697            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31698                enum_type: "VideoStreamType",
31699                value: tmp as u64,
31700            })?;
31701        let mut tmp = [0_u8; 32usize];
31702        for v in &mut tmp {
31703            *v = buf.get_u8()?;
31704        }
31705        __struct.name = CharArray::new(tmp);
31706        let mut tmp = [0_u8; 160usize];
31707        for v in &mut tmp {
31708            *v = buf.get_u8()?;
31709        }
31710        __struct.uri = CharArray::new(tmp);
31711        let tmp = buf.get_u8()?;
31712        __struct.encoding =
31713            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31714                enum_type: "VideoStreamEncoding",
31715                value: tmp as u64,
31716            })?;
31717        __struct.camera_device_id = buf.get_u8()?;
31718        Ok(__struct)
31719    }
31720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31721        let mut __tmp = BytesMut::new(bytes);
31722        #[allow(clippy::absurd_extreme_comparisons)]
31723        #[allow(unused_comparisons)]
31724        if __tmp.remaining() < Self::ENCODED_LEN {
31725            panic!(
31726                "buffer is too small (need {} bytes, but got {})",
31727                Self::ENCODED_LEN,
31728                __tmp.remaining(),
31729            )
31730        }
31731        __tmp.put_f32_le(self.framerate);
31732        __tmp.put_u32_le(self.bitrate);
31733        __tmp.put_u16_le(self.flags.bits() as u16);
31734        __tmp.put_u16_le(self.resolution_h);
31735        __tmp.put_u16_le(self.resolution_v);
31736        __tmp.put_u16_le(self.rotation);
31737        __tmp.put_u16_le(self.hfov);
31738        __tmp.put_u8(self.stream_id);
31739        __tmp.put_u8(self.count);
31740        __tmp.put_u8(self.mavtype as u8);
31741        for val in &self.name {
31742            __tmp.put_u8(*val);
31743        }
31744        for val in &self.uri {
31745            __tmp.put_u8(*val);
31746        }
31747        if matches!(version, MavlinkVersion::V2) {
31748            __tmp.put_u8(self.encoding as u8);
31749            __tmp.put_u8(self.camera_device_id);
31750            let len = __tmp.len();
31751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31752        } else {
31753            __tmp.len()
31754        }
31755    }
31756}
31757#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31758#[doc = ""]
31759#[doc = "ID: 270"]
31760#[derive(Debug, Clone, PartialEq)]
31761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31763#[cfg_attr(feature = "ts", derive(TS))]
31764#[cfg_attr(feature = "ts", ts(export))]
31765pub struct VIDEO_STREAM_STATUS_DATA {
31766    #[doc = "Frame rate"]
31767    pub framerate: f32,
31768    #[doc = "Bit rate"]
31769    pub bitrate: u32,
31770    #[doc = "Bitmap of stream status flags"]
31771    pub flags: VideoStreamStatusFlags,
31772    #[doc = "Horizontal resolution"]
31773    pub resolution_h: u16,
31774    #[doc = "Vertical resolution"]
31775    pub resolution_v: u16,
31776    #[doc = "Video image rotation clockwise"]
31777    pub rotation: u16,
31778    #[doc = "Horizontal Field of view"]
31779    pub hfov: u16,
31780    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31781    pub stream_id: u8,
31782    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31784    pub camera_device_id: u8,
31785}
31786impl VIDEO_STREAM_STATUS_DATA {
31787    pub const ENCODED_LEN: usize = 20usize;
31788    pub const DEFAULT: Self = Self {
31789        framerate: 0.0_f32,
31790        bitrate: 0_u32,
31791        flags: VideoStreamStatusFlags::DEFAULT,
31792        resolution_h: 0_u16,
31793        resolution_v: 0_u16,
31794        rotation: 0_u16,
31795        hfov: 0_u16,
31796        stream_id: 0_u8,
31797        camera_device_id: 0_u8,
31798    };
31799    #[cfg(feature = "arbitrary")]
31800    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31801        use arbitrary::{Arbitrary, Unstructured};
31802        let mut buf = [0u8; 1024];
31803        rng.fill_bytes(&mut buf);
31804        let mut unstructured = Unstructured::new(&buf);
31805        Self::arbitrary(&mut unstructured).unwrap_or_default()
31806    }
31807}
31808impl Default for VIDEO_STREAM_STATUS_DATA {
31809    fn default() -> Self {
31810        Self::DEFAULT.clone()
31811    }
31812}
31813impl MessageData for VIDEO_STREAM_STATUS_DATA {
31814    type Message = MavMessage;
31815    const ID: u32 = 270u32;
31816    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31817    const EXTRA_CRC: u8 = 59u8;
31818    const ENCODED_LEN: usize = 20usize;
31819    fn deser(
31820        _version: MavlinkVersion,
31821        __input: &[u8],
31822    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31823        let avail_len = __input.len();
31824        let mut payload_buf = [0; Self::ENCODED_LEN];
31825        let mut buf = if avail_len < Self::ENCODED_LEN {
31826            payload_buf[0..avail_len].copy_from_slice(__input);
31827            Bytes::new(&payload_buf)
31828        } else {
31829            Bytes::new(__input)
31830        };
31831        let mut __struct = Self::default();
31832        __struct.framerate = buf.get_f32_le()?;
31833        __struct.bitrate = buf.get_u32_le()?;
31834        let tmp = buf.get_u16_le()?;
31835        __struct.flags =
31836            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31837                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31838                    flag_type: "VideoStreamStatusFlags",
31839                    value: tmp as u64,
31840                })?;
31841        __struct.resolution_h = buf.get_u16_le()?;
31842        __struct.resolution_v = buf.get_u16_le()?;
31843        __struct.rotation = buf.get_u16_le()?;
31844        __struct.hfov = buf.get_u16_le()?;
31845        __struct.stream_id = buf.get_u8()?;
31846        __struct.camera_device_id = buf.get_u8()?;
31847        Ok(__struct)
31848    }
31849    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31850        let mut __tmp = BytesMut::new(bytes);
31851        #[allow(clippy::absurd_extreme_comparisons)]
31852        #[allow(unused_comparisons)]
31853        if __tmp.remaining() < Self::ENCODED_LEN {
31854            panic!(
31855                "buffer is too small (need {} bytes, but got {})",
31856                Self::ENCODED_LEN,
31857                __tmp.remaining(),
31858            )
31859        }
31860        __tmp.put_f32_le(self.framerate);
31861        __tmp.put_u32_le(self.bitrate);
31862        __tmp.put_u16_le(self.flags.bits() as u16);
31863        __tmp.put_u16_le(self.resolution_h);
31864        __tmp.put_u16_le(self.resolution_v);
31865        __tmp.put_u16_le(self.rotation);
31866        __tmp.put_u16_le(self.hfov);
31867        __tmp.put_u8(self.stream_id);
31868        if matches!(version, MavlinkVersion::V2) {
31869            __tmp.put_u8(self.camera_device_id);
31870            let len = __tmp.len();
31871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31872        } else {
31873            __tmp.len()
31874        }
31875    }
31876}
31877#[doc = "Local position/attitude estimate from a vision source."]
31878#[doc = ""]
31879#[doc = "ID: 102"]
31880#[derive(Debug, Clone, PartialEq)]
31881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31883#[cfg_attr(feature = "ts", derive(TS))]
31884#[cfg_attr(feature = "ts", ts(export))]
31885pub struct VISION_POSITION_ESTIMATE_DATA {
31886    #[doc = "Timestamp (UNIX time or time since system boot)"]
31887    pub usec: u64,
31888    #[doc = "Local X position"]
31889    pub x: f32,
31890    #[doc = "Local Y position"]
31891    pub y: f32,
31892    #[doc = "Local Z position"]
31893    pub z: f32,
31894    #[doc = "Roll angle"]
31895    pub roll: f32,
31896    #[doc = "Pitch angle"]
31897    pub pitch: f32,
31898    #[doc = "Yaw angle"]
31899    pub yaw: f32,
31900    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31901    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31903    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31904    pub covariance: [f32; 21],
31905    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31906    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31907    pub reset_counter: u8,
31908}
31909impl VISION_POSITION_ESTIMATE_DATA {
31910    pub const ENCODED_LEN: usize = 117usize;
31911    pub const DEFAULT: Self = Self {
31912        usec: 0_u64,
31913        x: 0.0_f32,
31914        y: 0.0_f32,
31915        z: 0.0_f32,
31916        roll: 0.0_f32,
31917        pitch: 0.0_f32,
31918        yaw: 0.0_f32,
31919        covariance: [0.0_f32; 21usize],
31920        reset_counter: 0_u8,
31921    };
31922    #[cfg(feature = "arbitrary")]
31923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31924        use arbitrary::{Arbitrary, Unstructured};
31925        let mut buf = [0u8; 1024];
31926        rng.fill_bytes(&mut buf);
31927        let mut unstructured = Unstructured::new(&buf);
31928        Self::arbitrary(&mut unstructured).unwrap_or_default()
31929    }
31930}
31931impl Default for VISION_POSITION_ESTIMATE_DATA {
31932    fn default() -> Self {
31933        Self::DEFAULT.clone()
31934    }
31935}
31936impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31937    type Message = MavMessage;
31938    const ID: u32 = 102u32;
31939    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31940    const EXTRA_CRC: u8 = 158u8;
31941    const ENCODED_LEN: usize = 117usize;
31942    fn deser(
31943        _version: MavlinkVersion,
31944        __input: &[u8],
31945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31946        let avail_len = __input.len();
31947        let mut payload_buf = [0; Self::ENCODED_LEN];
31948        let mut buf = if avail_len < Self::ENCODED_LEN {
31949            payload_buf[0..avail_len].copy_from_slice(__input);
31950            Bytes::new(&payload_buf)
31951        } else {
31952            Bytes::new(__input)
31953        };
31954        let mut __struct = Self::default();
31955        __struct.usec = buf.get_u64_le()?;
31956        __struct.x = buf.get_f32_le()?;
31957        __struct.y = buf.get_f32_le()?;
31958        __struct.z = buf.get_f32_le()?;
31959        __struct.roll = buf.get_f32_le()?;
31960        __struct.pitch = buf.get_f32_le()?;
31961        __struct.yaw = buf.get_f32_le()?;
31962        for v in &mut __struct.covariance {
31963            let val = buf.get_f32_le()?;
31964            *v = val;
31965        }
31966        __struct.reset_counter = buf.get_u8()?;
31967        Ok(__struct)
31968    }
31969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31970        let mut __tmp = BytesMut::new(bytes);
31971        #[allow(clippy::absurd_extreme_comparisons)]
31972        #[allow(unused_comparisons)]
31973        if __tmp.remaining() < Self::ENCODED_LEN {
31974            panic!(
31975                "buffer is too small (need {} bytes, but got {})",
31976                Self::ENCODED_LEN,
31977                __tmp.remaining(),
31978            )
31979        }
31980        __tmp.put_u64_le(self.usec);
31981        __tmp.put_f32_le(self.x);
31982        __tmp.put_f32_le(self.y);
31983        __tmp.put_f32_le(self.z);
31984        __tmp.put_f32_le(self.roll);
31985        __tmp.put_f32_le(self.pitch);
31986        __tmp.put_f32_le(self.yaw);
31987        if matches!(version, MavlinkVersion::V2) {
31988            for val in &self.covariance {
31989                __tmp.put_f32_le(*val);
31990            }
31991            __tmp.put_u8(self.reset_counter);
31992            let len = __tmp.len();
31993            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31994        } else {
31995            __tmp.len()
31996        }
31997    }
31998}
31999#[doc = "Speed estimate from a vision source."]
32000#[doc = ""]
32001#[doc = "ID: 103"]
32002#[derive(Debug, Clone, PartialEq)]
32003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32005#[cfg_attr(feature = "ts", derive(TS))]
32006#[cfg_attr(feature = "ts", ts(export))]
32007pub struct VISION_SPEED_ESTIMATE_DATA {
32008    #[doc = "Timestamp (UNIX time or time since system boot)"]
32009    pub usec: u64,
32010    #[doc = "Global X speed"]
32011    pub x: f32,
32012    #[doc = "Global Y speed"]
32013    pub y: f32,
32014    #[doc = "Global Z speed"]
32015    pub z: f32,
32016    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32020    pub covariance: [f32; 9],
32021    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32022    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32023    pub reset_counter: u8,
32024}
32025impl VISION_SPEED_ESTIMATE_DATA {
32026    pub const ENCODED_LEN: usize = 57usize;
32027    pub const DEFAULT: Self = Self {
32028        usec: 0_u64,
32029        x: 0.0_f32,
32030        y: 0.0_f32,
32031        z: 0.0_f32,
32032        covariance: [0.0_f32; 9usize],
32033        reset_counter: 0_u8,
32034    };
32035    #[cfg(feature = "arbitrary")]
32036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32037        use arbitrary::{Arbitrary, Unstructured};
32038        let mut buf = [0u8; 1024];
32039        rng.fill_bytes(&mut buf);
32040        let mut unstructured = Unstructured::new(&buf);
32041        Self::arbitrary(&mut unstructured).unwrap_or_default()
32042    }
32043}
32044impl Default for VISION_SPEED_ESTIMATE_DATA {
32045    fn default() -> Self {
32046        Self::DEFAULT.clone()
32047    }
32048}
32049impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32050    type Message = MavMessage;
32051    const ID: u32 = 103u32;
32052    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32053    const EXTRA_CRC: u8 = 208u8;
32054    const ENCODED_LEN: usize = 57usize;
32055    fn deser(
32056        _version: MavlinkVersion,
32057        __input: &[u8],
32058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32059        let avail_len = __input.len();
32060        let mut payload_buf = [0; Self::ENCODED_LEN];
32061        let mut buf = if avail_len < Self::ENCODED_LEN {
32062            payload_buf[0..avail_len].copy_from_slice(__input);
32063            Bytes::new(&payload_buf)
32064        } else {
32065            Bytes::new(__input)
32066        };
32067        let mut __struct = Self::default();
32068        __struct.usec = buf.get_u64_le()?;
32069        __struct.x = buf.get_f32_le()?;
32070        __struct.y = buf.get_f32_le()?;
32071        __struct.z = buf.get_f32_le()?;
32072        for v in &mut __struct.covariance {
32073            let val = buf.get_f32_le()?;
32074            *v = val;
32075        }
32076        __struct.reset_counter = buf.get_u8()?;
32077        Ok(__struct)
32078    }
32079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32080        let mut __tmp = BytesMut::new(bytes);
32081        #[allow(clippy::absurd_extreme_comparisons)]
32082        #[allow(unused_comparisons)]
32083        if __tmp.remaining() < Self::ENCODED_LEN {
32084            panic!(
32085                "buffer is too small (need {} bytes, but got {})",
32086                Self::ENCODED_LEN,
32087                __tmp.remaining(),
32088            )
32089        }
32090        __tmp.put_u64_le(self.usec);
32091        __tmp.put_f32_le(self.x);
32092        __tmp.put_f32_le(self.y);
32093        __tmp.put_f32_le(self.z);
32094        if matches!(version, MavlinkVersion::V2) {
32095            for val in &self.covariance {
32096                __tmp.put_f32_le(*val);
32097            }
32098            __tmp.put_u8(self.reset_counter);
32099            let len = __tmp.len();
32100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32101        } else {
32102            __tmp.len()
32103        }
32104    }
32105}
32106#[doc = "Cumulative distance traveled for each reported wheel."]
32107#[doc = ""]
32108#[doc = "ID: 9000"]
32109#[derive(Debug, Clone, PartialEq)]
32110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32112#[cfg_attr(feature = "ts", derive(TS))]
32113#[cfg_attr(feature = "ts", ts(export))]
32114pub struct WHEEL_DISTANCE_DATA {
32115    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32116    pub time_usec: u64,
32117    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32118    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32119    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32120    pub distance: [f64; 16],
32121    #[doc = "Number of wheels reported."]
32122    pub count: u8,
32123}
32124impl WHEEL_DISTANCE_DATA {
32125    pub const ENCODED_LEN: usize = 137usize;
32126    pub const DEFAULT: Self = Self {
32127        time_usec: 0_u64,
32128        distance: [0.0_f64; 16usize],
32129        count: 0_u8,
32130    };
32131    #[cfg(feature = "arbitrary")]
32132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32133        use arbitrary::{Arbitrary, Unstructured};
32134        let mut buf = [0u8; 1024];
32135        rng.fill_bytes(&mut buf);
32136        let mut unstructured = Unstructured::new(&buf);
32137        Self::arbitrary(&mut unstructured).unwrap_or_default()
32138    }
32139}
32140impl Default for WHEEL_DISTANCE_DATA {
32141    fn default() -> Self {
32142        Self::DEFAULT.clone()
32143    }
32144}
32145impl MessageData for WHEEL_DISTANCE_DATA {
32146    type Message = MavMessage;
32147    const ID: u32 = 9000u32;
32148    const NAME: &'static str = "WHEEL_DISTANCE";
32149    const EXTRA_CRC: u8 = 113u8;
32150    const ENCODED_LEN: usize = 137usize;
32151    fn deser(
32152        _version: MavlinkVersion,
32153        __input: &[u8],
32154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32155        let avail_len = __input.len();
32156        let mut payload_buf = [0; Self::ENCODED_LEN];
32157        let mut buf = if avail_len < Self::ENCODED_LEN {
32158            payload_buf[0..avail_len].copy_from_slice(__input);
32159            Bytes::new(&payload_buf)
32160        } else {
32161            Bytes::new(__input)
32162        };
32163        let mut __struct = Self::default();
32164        __struct.time_usec = buf.get_u64_le()?;
32165        for v in &mut __struct.distance {
32166            let val = buf.get_f64_le()?;
32167            *v = val;
32168        }
32169        __struct.count = buf.get_u8()?;
32170        Ok(__struct)
32171    }
32172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32173        let mut __tmp = BytesMut::new(bytes);
32174        #[allow(clippy::absurd_extreme_comparisons)]
32175        #[allow(unused_comparisons)]
32176        if __tmp.remaining() < Self::ENCODED_LEN {
32177            panic!(
32178                "buffer is too small (need {} bytes, but got {})",
32179                Self::ENCODED_LEN,
32180                __tmp.remaining(),
32181            )
32182        }
32183        __tmp.put_u64_le(self.time_usec);
32184        for val in &self.distance {
32185            __tmp.put_f64_le(*val);
32186        }
32187        __tmp.put_u8(self.count);
32188        if matches!(version, MavlinkVersion::V2) {
32189            let len = __tmp.len();
32190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32191        } else {
32192            __tmp.len()
32193        }
32194    }
32195}
32196#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32197#[doc = ""]
32198#[doc = "ID: 299"]
32199#[derive(Debug, Clone, PartialEq)]
32200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32202#[cfg_attr(feature = "ts", derive(TS))]
32203#[cfg_attr(feature = "ts", ts(export))]
32204pub struct WIFI_CONFIG_AP_DATA {
32205    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32206    #[cfg_attr(feature = "ts", ts(type = "string"))]
32207    pub ssid: CharArray<32>,
32208    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32209    #[cfg_attr(feature = "ts", ts(type = "string"))]
32210    pub password: CharArray<64>,
32211    #[doc = "WiFi Mode."]
32212    #[cfg_attr(feature = "serde", serde(default))]
32213    pub mode: WifiConfigApMode,
32214    #[doc = "Message acceptance response (sent back to GS)."]
32215    #[cfg_attr(feature = "serde", serde(default))]
32216    pub response: WifiConfigApResponse,
32217}
32218impl WIFI_CONFIG_AP_DATA {
32219    pub const ENCODED_LEN: usize = 98usize;
32220    pub const DEFAULT: Self = Self {
32221        ssid: CharArray::new([0_u8; 32usize]),
32222        password: CharArray::new([0_u8; 64usize]),
32223        mode: WifiConfigApMode::DEFAULT,
32224        response: WifiConfigApResponse::DEFAULT,
32225    };
32226    #[cfg(feature = "arbitrary")]
32227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32228        use arbitrary::{Arbitrary, Unstructured};
32229        let mut buf = [0u8; 1024];
32230        rng.fill_bytes(&mut buf);
32231        let mut unstructured = Unstructured::new(&buf);
32232        Self::arbitrary(&mut unstructured).unwrap_or_default()
32233    }
32234}
32235impl Default for WIFI_CONFIG_AP_DATA {
32236    fn default() -> Self {
32237        Self::DEFAULT.clone()
32238    }
32239}
32240impl MessageData for WIFI_CONFIG_AP_DATA {
32241    type Message = MavMessage;
32242    const ID: u32 = 299u32;
32243    const NAME: &'static str = "WIFI_CONFIG_AP";
32244    const EXTRA_CRC: u8 = 19u8;
32245    const ENCODED_LEN: usize = 98usize;
32246    fn deser(
32247        _version: MavlinkVersion,
32248        __input: &[u8],
32249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32250        let avail_len = __input.len();
32251        let mut payload_buf = [0; Self::ENCODED_LEN];
32252        let mut buf = if avail_len < Self::ENCODED_LEN {
32253            payload_buf[0..avail_len].copy_from_slice(__input);
32254            Bytes::new(&payload_buf)
32255        } else {
32256            Bytes::new(__input)
32257        };
32258        let mut __struct = Self::default();
32259        let mut tmp = [0_u8; 32usize];
32260        for v in &mut tmp {
32261            *v = buf.get_u8()?;
32262        }
32263        __struct.ssid = CharArray::new(tmp);
32264        let mut tmp = [0_u8; 64usize];
32265        for v in &mut tmp {
32266            *v = buf.get_u8()?;
32267        }
32268        __struct.password = CharArray::new(tmp);
32269        let tmp = buf.get_i8()?;
32270        __struct.mode =
32271            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32272                enum_type: "WifiConfigApMode",
32273                value: tmp as u64,
32274            })?;
32275        let tmp = buf.get_i8()?;
32276        __struct.response =
32277            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32278                enum_type: "WifiConfigApResponse",
32279                value: tmp as u64,
32280            })?;
32281        Ok(__struct)
32282    }
32283    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32284        let mut __tmp = BytesMut::new(bytes);
32285        #[allow(clippy::absurd_extreme_comparisons)]
32286        #[allow(unused_comparisons)]
32287        if __tmp.remaining() < Self::ENCODED_LEN {
32288            panic!(
32289                "buffer is too small (need {} bytes, but got {})",
32290                Self::ENCODED_LEN,
32291                __tmp.remaining(),
32292            )
32293        }
32294        for val in &self.ssid {
32295            __tmp.put_u8(*val);
32296        }
32297        for val in &self.password {
32298            __tmp.put_u8(*val);
32299        }
32300        if matches!(version, MavlinkVersion::V2) {
32301            __tmp.put_i8(self.mode as i8);
32302            __tmp.put_i8(self.response as i8);
32303            let len = __tmp.len();
32304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32305        } else {
32306            __tmp.len()
32307        }
32308    }
32309}
32310#[doc = "Winch status."]
32311#[doc = ""]
32312#[doc = "ID: 9005"]
32313#[derive(Debug, Clone, PartialEq)]
32314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32316#[cfg_attr(feature = "ts", derive(TS))]
32317#[cfg_attr(feature = "ts", ts(export))]
32318pub struct WINCH_STATUS_DATA {
32319    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32320    pub time_usec: u64,
32321    #[doc = "Length of line released. NaN if unknown"]
32322    pub line_length: f32,
32323    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32324    pub speed: f32,
32325    #[doc = "Tension on the line. NaN if unknown"]
32326    pub tension: f32,
32327    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32328    pub voltage: f32,
32329    #[doc = "Current draw from the winch. NaN if unknown"]
32330    pub current: f32,
32331    #[doc = "Status flags"]
32332    pub status: MavWinchStatusFlag,
32333    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32334    pub temperature: i16,
32335}
32336impl WINCH_STATUS_DATA {
32337    pub const ENCODED_LEN: usize = 34usize;
32338    pub const DEFAULT: Self = Self {
32339        time_usec: 0_u64,
32340        line_length: 0.0_f32,
32341        speed: 0.0_f32,
32342        tension: 0.0_f32,
32343        voltage: 0.0_f32,
32344        current: 0.0_f32,
32345        status: MavWinchStatusFlag::DEFAULT,
32346        temperature: 0_i16,
32347    };
32348    #[cfg(feature = "arbitrary")]
32349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32350        use arbitrary::{Arbitrary, Unstructured};
32351        let mut buf = [0u8; 1024];
32352        rng.fill_bytes(&mut buf);
32353        let mut unstructured = Unstructured::new(&buf);
32354        Self::arbitrary(&mut unstructured).unwrap_or_default()
32355    }
32356}
32357impl Default for WINCH_STATUS_DATA {
32358    fn default() -> Self {
32359        Self::DEFAULT.clone()
32360    }
32361}
32362impl MessageData for WINCH_STATUS_DATA {
32363    type Message = MavMessage;
32364    const ID: u32 = 9005u32;
32365    const NAME: &'static str = "WINCH_STATUS";
32366    const EXTRA_CRC: u8 = 117u8;
32367    const ENCODED_LEN: usize = 34usize;
32368    fn deser(
32369        _version: MavlinkVersion,
32370        __input: &[u8],
32371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32372        let avail_len = __input.len();
32373        let mut payload_buf = [0; Self::ENCODED_LEN];
32374        let mut buf = if avail_len < Self::ENCODED_LEN {
32375            payload_buf[0..avail_len].copy_from_slice(__input);
32376            Bytes::new(&payload_buf)
32377        } else {
32378            Bytes::new(__input)
32379        };
32380        let mut __struct = Self::default();
32381        __struct.time_usec = buf.get_u64_le()?;
32382        __struct.line_length = buf.get_f32_le()?;
32383        __struct.speed = buf.get_f32_le()?;
32384        __struct.tension = buf.get_f32_le()?;
32385        __struct.voltage = buf.get_f32_le()?;
32386        __struct.current = buf.get_f32_le()?;
32387        let tmp = buf.get_u32_le()?;
32388        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32389            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32390                flag_type: "MavWinchStatusFlag",
32391                value: tmp as u64,
32392            })?;
32393        __struct.temperature = buf.get_i16_le()?;
32394        Ok(__struct)
32395    }
32396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32397        let mut __tmp = BytesMut::new(bytes);
32398        #[allow(clippy::absurd_extreme_comparisons)]
32399        #[allow(unused_comparisons)]
32400        if __tmp.remaining() < Self::ENCODED_LEN {
32401            panic!(
32402                "buffer is too small (need {} bytes, but got {})",
32403                Self::ENCODED_LEN,
32404                __tmp.remaining(),
32405            )
32406        }
32407        __tmp.put_u64_le(self.time_usec);
32408        __tmp.put_f32_le(self.line_length);
32409        __tmp.put_f32_le(self.speed);
32410        __tmp.put_f32_le(self.tension);
32411        __tmp.put_f32_le(self.voltage);
32412        __tmp.put_f32_le(self.current);
32413        __tmp.put_u32_le(self.status.bits() as u32);
32414        __tmp.put_i16_le(self.temperature);
32415        if matches!(version, MavlinkVersion::V2) {
32416            let len = __tmp.len();
32417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32418        } else {
32419            __tmp.len()
32420        }
32421    }
32422}
32423#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32424#[doc = ""]
32425#[doc = "ID: 231"]
32426#[derive(Debug, Clone, PartialEq)]
32427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32429#[cfg_attr(feature = "ts", derive(TS))]
32430#[cfg_attr(feature = "ts", ts(export))]
32431pub struct WIND_COV_DATA {
32432    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32433    pub time_usec: u64,
32434    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32435    pub wind_x: f32,
32436    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32437    pub wind_y: f32,
32438    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32439    pub wind_z: f32,
32440    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32441    pub var_horiz: f32,
32442    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32443    pub var_vert: f32,
32444    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32445    pub wind_alt: f32,
32446    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32447    pub horiz_accuracy: f32,
32448    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32449    pub vert_accuracy: f32,
32450}
32451impl WIND_COV_DATA {
32452    pub const ENCODED_LEN: usize = 40usize;
32453    pub const DEFAULT: Self = Self {
32454        time_usec: 0_u64,
32455        wind_x: 0.0_f32,
32456        wind_y: 0.0_f32,
32457        wind_z: 0.0_f32,
32458        var_horiz: 0.0_f32,
32459        var_vert: 0.0_f32,
32460        wind_alt: 0.0_f32,
32461        horiz_accuracy: 0.0_f32,
32462        vert_accuracy: 0.0_f32,
32463    };
32464    #[cfg(feature = "arbitrary")]
32465    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32466        use arbitrary::{Arbitrary, Unstructured};
32467        let mut buf = [0u8; 1024];
32468        rng.fill_bytes(&mut buf);
32469        let mut unstructured = Unstructured::new(&buf);
32470        Self::arbitrary(&mut unstructured).unwrap_or_default()
32471    }
32472}
32473impl Default for WIND_COV_DATA {
32474    fn default() -> Self {
32475        Self::DEFAULT.clone()
32476    }
32477}
32478impl MessageData for WIND_COV_DATA {
32479    type Message = MavMessage;
32480    const ID: u32 = 231u32;
32481    const NAME: &'static str = "WIND_COV";
32482    const EXTRA_CRC: u8 = 105u8;
32483    const ENCODED_LEN: usize = 40usize;
32484    fn deser(
32485        _version: MavlinkVersion,
32486        __input: &[u8],
32487    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32488        let avail_len = __input.len();
32489        let mut payload_buf = [0; Self::ENCODED_LEN];
32490        let mut buf = if avail_len < Self::ENCODED_LEN {
32491            payload_buf[0..avail_len].copy_from_slice(__input);
32492            Bytes::new(&payload_buf)
32493        } else {
32494            Bytes::new(__input)
32495        };
32496        let mut __struct = Self::default();
32497        __struct.time_usec = buf.get_u64_le()?;
32498        __struct.wind_x = buf.get_f32_le()?;
32499        __struct.wind_y = buf.get_f32_le()?;
32500        __struct.wind_z = buf.get_f32_le()?;
32501        __struct.var_horiz = buf.get_f32_le()?;
32502        __struct.var_vert = buf.get_f32_le()?;
32503        __struct.wind_alt = buf.get_f32_le()?;
32504        __struct.horiz_accuracy = buf.get_f32_le()?;
32505        __struct.vert_accuracy = buf.get_f32_le()?;
32506        Ok(__struct)
32507    }
32508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32509        let mut __tmp = BytesMut::new(bytes);
32510        #[allow(clippy::absurd_extreme_comparisons)]
32511        #[allow(unused_comparisons)]
32512        if __tmp.remaining() < Self::ENCODED_LEN {
32513            panic!(
32514                "buffer is too small (need {} bytes, but got {})",
32515                Self::ENCODED_LEN,
32516                __tmp.remaining(),
32517            )
32518        }
32519        __tmp.put_u64_le(self.time_usec);
32520        __tmp.put_f32_le(self.wind_x);
32521        __tmp.put_f32_le(self.wind_y);
32522        __tmp.put_f32_le(self.wind_z);
32523        __tmp.put_f32_le(self.var_horiz);
32524        __tmp.put_f32_le(self.var_vert);
32525        __tmp.put_f32_le(self.wind_alt);
32526        __tmp.put_f32_le(self.horiz_accuracy);
32527        __tmp.put_f32_le(self.vert_accuracy);
32528        if matches!(version, MavlinkVersion::V2) {
32529            let len = __tmp.len();
32530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32531        } else {
32532            __tmp.len()
32533        }
32534    }
32535}
32536#[derive(Clone, PartialEq, Debug)]
32537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32538#[cfg_attr(feature = "serde", serde(tag = "type"))]
32539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32540#[cfg_attr(feature = "ts", derive(TS))]
32541#[cfg_attr(feature = "ts", ts(export))]
32542#[repr(u32)]
32543pub enum MavMessage {
32544    #[doc = "Set the vehicle attitude and body angular rates."]
32545    #[doc = ""]
32546    #[doc = "ID: 140"]
32547    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32548    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32549    #[doc = ""]
32550    #[doc = "ID: 375"]
32551    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32552    #[doc = "The location and information of an ADSB vehicle."]
32553    #[doc = ""]
32554    #[doc = "ID: 246"]
32555    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32556    #[doc = "The location and information of an AIS vessel."]
32557    #[doc = ""]
32558    #[doc = "ID: 301"]
32559    AIS_VESSEL(AIS_VESSEL_DATA),
32560    #[doc = "The current system altitude."]
32561    #[doc = ""]
32562    #[doc = "ID: 141"]
32563    ALTITUDE(ALTITUDE_DATA),
32564    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32565    #[doc = ""]
32566    #[doc = "ID: 30"]
32567    ATTITUDE(ATTITUDE_DATA),
32568    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32569    #[doc = ""]
32570    #[doc = "ID: 31"]
32571    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32572    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32573    #[doc = ""]
32574    #[doc = "ID: 61"]
32575    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32576    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32577    #[doc = ""]
32578    #[doc = "ID: 83"]
32579    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32580    #[doc = "Motion capture attitude and position."]
32581    #[doc = ""]
32582    #[doc = "ID: 138"]
32583    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32584    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32585    #[doc = ""]
32586    #[doc = "ID: 7"]
32587    AUTH_KEY(AUTH_KEY_DATA),
32588    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32589    #[doc = ""]
32590    #[doc = "ID: 286"]
32591    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32592    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32593    #[doc = ""]
32594    #[doc = "ID: 148"]
32595    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32596    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32597    #[doc = ""]
32598    #[doc = "ID: 435"]
32599    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32600    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32601    #[doc = ""]
32602    #[doc = "ID: 437"]
32603    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32604    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32605    #[doc = ""]
32606    #[doc = "ID: 372"]
32607    BATTERY_INFO(BATTERY_INFO_DATA),
32608    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32609    #[doc = ""]
32610    #[doc = "ID: 147"]
32611    BATTERY_STATUS(BATTERY_STATUS_DATA),
32612    #[doc = "Report button state change."]
32613    #[doc = ""]
32614    #[doc = "ID: 257"]
32615    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32616    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32617    #[doc = ""]
32618    #[doc = "ID: 262"]
32619    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32620    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32621    #[doc = ""]
32622    #[doc = "ID: 271"]
32623    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32624    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32625    #[doc = ""]
32626    #[doc = "ID: 263"]
32627    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32628    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32629    #[doc = ""]
32630    #[doc = "ID: 259"]
32631    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32632    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32633    #[doc = ""]
32634    #[doc = "ID: 260"]
32635    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32636    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32637    #[doc = ""]
32638    #[doc = "ID: 277"]
32639    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32640    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32641    #[doc = ""]
32642    #[doc = "ID: 276"]
32643    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32644    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32645    #[doc = ""]
32646    #[doc = "ID: 275"]
32647    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32648    #[doc = "Camera-IMU triggering and synchronisation message."]
32649    #[doc = ""]
32650    #[doc = "ID: 112"]
32651    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32652    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32653    #[doc = ""]
32654    #[doc = "ID: 387"]
32655    CANFD_FRAME(CANFD_FRAME_DATA),
32656    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32657    #[doc = ""]
32658    #[doc = "ID: 388"]
32659    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32660    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32661    #[doc = ""]
32662    #[doc = "ID: 386"]
32663    CAN_FRAME(CAN_FRAME_DATA),
32664    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32665    #[doc = ""]
32666    #[doc = "ID: 336"]
32667    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32668    #[doc = "Report current used cellular network status."]
32669    #[doc = ""]
32670    #[doc = "ID: 334"]
32671    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32672    #[doc = "Request to control this MAV."]
32673    #[doc = ""]
32674    #[doc = "ID: 5"]
32675    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32676    #[doc = "Accept / deny control of this MAV."]
32677    #[doc = ""]
32678    #[doc = "ID: 6"]
32679    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32680    #[doc = "Information about a potential collision."]
32681    #[doc = ""]
32682    #[doc = "ID: 247"]
32683    COLLISION(COLLISION_DATA),
32684    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32685    #[doc = ""]
32686    #[doc = "ID: 77"]
32687    COMMAND_ACK(COMMAND_ACK_DATA),
32688    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32689    #[doc = ""]
32690    #[doc = "ID: 80"]
32691    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32692    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32693    #[doc = ""]
32694    #[doc = "ID: 75"]
32695    COMMAND_INT(COMMAND_INT_DATA),
32696    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32697    #[doc = ""]
32698    #[doc = "ID: 76"]
32699    COMMAND_LONG(COMMAND_LONG_DATA),
32700    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32701    #[doc = ""]
32702    #[doc = "ID: 395"]
32703    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32704    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32705    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32706    #[doc = ""]
32707    #[doc = "ID: 396"]
32708    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32709    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32710    #[doc = ""]
32711    #[doc = "ID: 397"]
32712    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32713    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32714    #[doc = ""]
32715    #[doc = "ID: 146"]
32716    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32717    #[doc = "offset response to encapsulated data."]
32718    #[doc = ""]
32719    #[doc = "ID: 50005"]
32720    CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
32721    #[doc = "Start firmware update with encapsulated data."]
32722    #[doc = ""]
32723    #[doc = "ID: 50004"]
32724    CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
32725    #[doc = "Raw RC Data."]
32726    #[doc = ""]
32727    #[doc = "ID: 50001"]
32728    CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
32729    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32730    #[doc = ""]
32731    #[doc = "ID: 411"]
32732    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32733    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32734    #[doc = ""]
32735    #[doc = "ID: 436"]
32736    CURRENT_MODE(CURRENT_MODE_DATA),
32737    #[doc = "Data stream status information."]
32738    #[doc = ""]
32739    #[doc = "ID: 67"]
32740    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32741    DATA_STREAM(DATA_STREAM_DATA),
32742    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32743    #[doc = ""]
32744    #[doc = "ID: 130"]
32745    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32746    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32747    #[doc = ""]
32748    #[doc = "ID: 254"]
32749    DEBUG(DEBUG_DATA),
32750    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32751    #[doc = ""]
32752    #[doc = "ID: 350"]
32753    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32754    #[doc = "To debug something using a named 3D vector."]
32755    #[doc = ""]
32756    #[doc = "ID: 250"]
32757    DEBUG_VECT(DEBUG_VECT_DATA),
32758    #[doc = "Distance sensor information for an onboard rangefinder."]
32759    #[doc = ""]
32760    #[doc = "ID: 132"]
32761    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32762    #[doc = "EFI status output."]
32763    #[doc = ""]
32764    #[doc = "ID: 225"]
32765    EFI_STATUS(EFI_STATUS_DATA),
32766    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32767    #[doc = ""]
32768    #[doc = "ID: 131"]
32769    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32770    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32771    #[doc = ""]
32772    #[doc = "ID: 290"]
32773    ESC_INFO(ESC_INFO_DATA),
32774    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32775    #[doc = ""]
32776    #[doc = "ID: 291"]
32777    ESC_STATUS(ESC_STATUS_DATA),
32778    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32779    #[doc = ""]
32780    #[doc = "ID: 230"]
32781    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32782    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32783    #[doc = ""]
32784    #[doc = "ID: 410"]
32785    EVENT(EVENT_DATA),
32786    #[doc = "Provides state for additional features."]
32787    #[doc = ""]
32788    #[doc = "ID: 245"]
32789    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32790    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32791    #[doc = ""]
32792    #[doc = "ID: 162"]
32793    FENCE_STATUS(FENCE_STATUS_DATA),
32794    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32795    #[doc = ""]
32796    #[doc = "ID: 110"]
32797    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32798    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32799    #[doc = ""]
32800    #[doc = "ID: 264"]
32801    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32802    #[doc = "Current motion information from a designated system."]
32803    #[doc = ""]
32804    #[doc = "ID: 144"]
32805    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32806    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32807    #[doc = ""]
32808    #[doc = "ID: 371"]
32809    FUEL_STATUS(FUEL_STATUS_DATA),
32810    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32811    #[doc = ""]
32812    #[doc = "ID: 373"]
32813    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32814    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32815    #[doc = ""]
32816    #[doc = "ID: 285"]
32817    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32818    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32819    #[doc = ""]
32820    #[doc = "ID: 283"]
32821    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32822    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32823    #[doc = ""]
32824    #[doc = "ID: 284"]
32825    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32826    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32827    #[doc = ""]
32828    #[doc = "ID: 280"]
32829    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32830    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32831    #[doc = ""]
32832    #[doc = "ID: 282"]
32833    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32834    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32835    #[doc = ""]
32836    #[doc = "ID: 288"]
32837    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32838    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32839    #[doc = ""]
32840    #[doc = "ID: 287"]
32841    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32842    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32843    #[doc = ""]
32844    #[doc = "ID: 281"]
32845    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32846    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32847    #[doc = ""]
32848    #[doc = "ID: 33"]
32849    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32850    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32851    #[doc = ""]
32852    #[doc = "ID: 63"]
32853    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32854    #[doc = "Global position/attitude estimate from a vision source."]
32855    #[doc = ""]
32856    #[doc = "ID: 101"]
32857    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32858    #[doc = "Second GPS data."]
32859    #[doc = ""]
32860    #[doc = "ID: 124"]
32861    GPS2_RAW(GPS2_RAW_DATA),
32862    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32863    #[doc = ""]
32864    #[doc = "ID: 128"]
32865    GPS2_RTK(GPS2_RTK_DATA),
32866    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32867    #[doc = ""]
32868    #[doc = "ID: 49"]
32869    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32870    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32871    #[doc = ""]
32872    #[doc = "ID: 123"]
32873    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32874    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32875    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32876    #[doc = ""]
32877    #[doc = "ID: 232"]
32878    GPS_INPUT(GPS_INPUT_DATA),
32879    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32880    #[doc = ""]
32881    #[doc = "ID: 24"]
32882    GPS_RAW_INT(GPS_RAW_INT_DATA),
32883    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32884    #[doc = ""]
32885    #[doc = "ID: 233"]
32886    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32887    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32888    #[doc = ""]
32889    #[doc = "ID: 127"]
32890    GPS_RTK(GPS_RTK_DATA),
32891    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32892    #[doc = ""]
32893    #[doc = "ID: 25"]
32894    GPS_STATUS(GPS_STATUS_DATA),
32895    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32896    #[doc = ""]
32897    #[doc = "ID: 0"]
32898    HEARTBEAT(HEARTBEAT_DATA),
32899    #[doc = "Herelink Telemetry."]
32900    #[doc = ""]
32901    #[doc = "ID: 50003"]
32902    HERELINK_TELEM(HERELINK_TELEM_DATA),
32903    #[doc = "Information about video stream."]
32904    #[doc = ""]
32905    #[doc = "ID: 50002"]
32906    HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
32907    #[doc = "The IMU readings in SI units in NED body frame."]
32908    #[doc = ""]
32909    #[doc = "ID: 105"]
32910    HIGHRES_IMU(HIGHRES_IMU_DATA),
32911    #[doc = "Message appropriate for high latency connections like Iridium."]
32912    #[doc = ""]
32913    #[doc = "ID: 234"]
32914    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32915    HIGH_LATENCY(HIGH_LATENCY_DATA),
32916    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32917    #[doc = ""]
32918    #[doc = "ID: 235"]
32919    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32920    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32921    #[doc = ""]
32922    #[doc = "ID: 93"]
32923    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32924    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32925    #[doc = ""]
32926    #[doc = "ID: 91"]
32927    HIL_CONTROLS(HIL_CONTROLS_DATA),
32928    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32929    #[doc = ""]
32930    #[doc = "ID: 113"]
32931    HIL_GPS(HIL_GPS_DATA),
32932    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32933    #[doc = ""]
32934    #[doc = "ID: 114"]
32935    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32936    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32937    #[doc = ""]
32938    #[doc = "ID: 92"]
32939    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32940    #[doc = "The IMU readings in SI units in NED body frame."]
32941    #[doc = ""]
32942    #[doc = "ID: 107"]
32943    HIL_SENSOR(HIL_SENSOR_DATA),
32944    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32945    #[doc = ""]
32946    #[doc = "ID: 90"]
32947    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32948    HIL_STATE(HIL_STATE_DATA),
32949    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32950    #[doc = ""]
32951    #[doc = "ID: 115"]
32952    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32953    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32954    #[doc = ""]
32955    #[doc = "ID: 242"]
32956    HOME_POSITION(HOME_POSITION_DATA),
32957    #[doc = "Temperature and humidity from hygrometer."]
32958    #[doc = ""]
32959    #[doc = "ID: 12920"]
32960    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32961    #[doc = "Illuminator status."]
32962    #[doc = ""]
32963    #[doc = "ID: 440"]
32964    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32965    #[doc = "Status of the Iridium SBD link."]
32966    #[doc = ""]
32967    #[doc = "ID: 335"]
32968    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32969    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32970    #[doc = ""]
32971    #[doc = "ID: 149"]
32972    LANDING_TARGET(LANDING_TARGET_DATA),
32973    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32974    #[doc = ""]
32975    #[doc = "ID: 8"]
32976    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32977    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32978    #[doc = ""]
32979    #[doc = "ID: 32"]
32980    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32981    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32982    #[doc = ""]
32983    #[doc = "ID: 64"]
32984    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32985    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32986    #[doc = ""]
32987    #[doc = "ID: 89"]
32988    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32989    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32990    #[doc = ""]
32991    #[doc = "ID: 268"]
32992    LOGGING_ACK(LOGGING_ACK_DATA),
32993    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32994    #[doc = ""]
32995    #[doc = "ID: 266"]
32996    LOGGING_DATA(LOGGING_DATA_DATA),
32997    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32998    #[doc = ""]
32999    #[doc = "ID: 267"]
33000    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33001    #[doc = "Reply to LOG_REQUEST_DATA."]
33002    #[doc = ""]
33003    #[doc = "ID: 120"]
33004    LOG_DATA(LOG_DATA_DATA),
33005    #[doc = "Reply to LOG_REQUEST_LIST."]
33006    #[doc = ""]
33007    #[doc = "ID: 118"]
33008    LOG_ENTRY(LOG_ENTRY_DATA),
33009    #[doc = "Erase all logs."]
33010    #[doc = ""]
33011    #[doc = "ID: 121"]
33012    LOG_ERASE(LOG_ERASE_DATA),
33013    #[doc = "Request a chunk of a log."]
33014    #[doc = ""]
33015    #[doc = "ID: 119"]
33016    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33017    #[doc = "Stop log transfer and resume normal logging."]
33018    #[doc = ""]
33019    #[doc = "ID: 122"]
33020    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33021    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33022    #[doc = ""]
33023    #[doc = "ID: 117"]
33024    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33025    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33026    #[doc = ""]
33027    #[doc = "ID: 192"]
33028    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33029    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33030    #[doc = ""]
33031    #[doc = "ID: 69"]
33032    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33033    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33034    #[doc = ""]
33035    #[doc = "ID: 81"]
33036    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33037    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33038    #[doc = ""]
33039    #[doc = "ID: 249"]
33040    MEMORY_VECT(MEMORY_VECT_DATA),
33041    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33042    #[doc = ""]
33043    #[doc = "ID: 244"]
33044    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33045    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33046    #[doc = ""]
33047    #[doc = "ID: 47"]
33048    MISSION_ACK(MISSION_ACK_DATA),
33049    #[doc = "Delete all mission items at once."]
33050    #[doc = ""]
33051    #[doc = "ID: 45"]
33052    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33053    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33054    #[doc = ""]
33055    #[doc = "ID: 44"]
33056    MISSION_COUNT(MISSION_COUNT_DATA),
33057    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33058    #[doc = ""]
33059    #[doc = "ID: 42"]
33060    MISSION_CURRENT(MISSION_CURRENT_DATA),
33061    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33062    #[doc = ""]
33063    #[doc = "ID: 39"]
33064    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33065    MISSION_ITEM(MISSION_ITEM_DATA),
33066    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33067    #[doc = ""]
33068    #[doc = "ID: 73"]
33069    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33070    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33071    #[doc = ""]
33072    #[doc = "ID: 46"]
33073    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33074    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33075    #[doc = ""]
33076    #[doc = "ID: 40"]
33077    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33078    MISSION_REQUEST(MISSION_REQUEST_DATA),
33079    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33080    #[doc = ""]
33081    #[doc = "ID: 51"]
33082    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33083    #[doc = "Request the overall list of mission items from the system/component."]
33084    #[doc = ""]
33085    #[doc = "ID: 43"]
33086    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33087    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33088    #[doc = ""]
33089    #[doc = "ID: 37"]
33090    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33091    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33092    #[doc = ""]
33093    #[doc = "ID: 41"]
33094    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33095    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33096    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33097    #[doc = ""]
33098    #[doc = "ID: 38"]
33099    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33100    #[doc = "Orientation of a mount."]
33101    #[doc = ""]
33102    #[doc = "ID: 265"]
33103    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33104    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33105    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33106    #[doc = ""]
33107    #[doc = "ID: 251"]
33108    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33109    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33110    #[doc = ""]
33111    #[doc = "ID: 252"]
33112    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33113    #[doc = "The state of the navigation and position controller."]
33114    #[doc = ""]
33115    #[doc = "ID: 62"]
33116    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33117    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33118    #[doc = ""]
33119    #[doc = "ID: 330"]
33120    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33121    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33122    #[doc = ""]
33123    #[doc = "ID: 331"]
33124    ODOMETRY(ODOMETRY_DATA),
33125    #[doc = "Hardware status sent by an onboard computer."]
33126    #[doc = ""]
33127    #[doc = "ID: 390"]
33128    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33129    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33130    #[doc = ""]
33131    #[doc = "ID: 12918"]
33132    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33133    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33134    #[doc = ""]
33135    #[doc = "ID: 12902"]
33136    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33137    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33138    #[doc = ""]
33139    #[doc = "ID: 12900"]
33140    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33141    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33142    #[doc = ""]
33143    #[doc = "ID: 12901"]
33144    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33145    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33146    #[doc = ""]
33147    #[doc = "ID: 12915"]
33148    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33149    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33150    #[doc = ""]
33151    #[doc = "ID: 12905"]
33152    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33153    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33154    #[doc = ""]
33155    #[doc = "ID: 12903"]
33156    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33157    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33158    #[doc = ""]
33159    #[doc = "ID: 12904"]
33160    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33161    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33162    #[doc = ""]
33163    #[doc = "ID: 12919"]
33164    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33165    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33166    #[doc = ""]
33167    #[doc = "ID: 100"]
33168    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33169    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33170    #[doc = ""]
33171    #[doc = "ID: 106"]
33172    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33173    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33174    #[doc = ""]
33175    #[doc = "ID: 360"]
33176    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33177    #[doc = "Response from a PARAM_EXT_SET message."]
33178    #[doc = ""]
33179    #[doc = "ID: 324"]
33180    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33181    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33182    #[doc = ""]
33183    #[doc = "ID: 321"]
33184    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33185    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33186    #[doc = ""]
33187    #[doc = "ID: 320"]
33188    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33189    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33190    #[doc = ""]
33191    #[doc = "ID: 323"]
33192    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33193    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33194    #[doc = ""]
33195    #[doc = "ID: 322"]
33196    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33197    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33198    #[doc = ""]
33199    #[doc = "ID: 50"]
33200    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33201    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33202    #[doc = ""]
33203    #[doc = "ID: 21"]
33204    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33205    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33206    #[doc = ""]
33207    #[doc = "ID: 20"]
33208    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33209    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33210    #[doc = ""]
33211    #[doc = "ID: 23"]
33212    PARAM_SET(PARAM_SET_DATA),
33213    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33214    #[doc = ""]
33215    #[doc = "ID: 22"]
33216    PARAM_VALUE(PARAM_VALUE_DATA),
33217    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33218    #[doc = ""]
33219    #[doc = "ID: 4"]
33220    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33221    PING(PING_DATA),
33222    #[doc = "Control vehicle tone generation (buzzer)."]
33223    #[doc = ""]
33224    #[doc = "ID: 258"]
33225    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33226    PLAY_TUNE(PLAY_TUNE_DATA),
33227    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33228    #[doc = ""]
33229    #[doc = "ID: 400"]
33230    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33231    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33232    #[doc = ""]
33233    #[doc = "ID: 87"]
33234    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33235    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33236    #[doc = ""]
33237    #[doc = "ID: 85"]
33238    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33239    #[doc = "Power supply status."]
33240    #[doc = ""]
33241    #[doc = "ID: 125"]
33242    POWER_STATUS(POWER_STATUS_DATA),
33243    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33244    #[doc = ""]
33245    #[doc = "ID: 300"]
33246    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33247    #[doc = "Status generated by radio and injected into MAVLink stream."]
33248    #[doc = ""]
33249    #[doc = "ID: 109"]
33250    RADIO_STATUS(RADIO_STATUS_DATA),
33251    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33252    #[doc = ""]
33253    #[doc = "ID: 27"]
33254    RAW_IMU(RAW_IMU_DATA),
33255    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33256    #[doc = ""]
33257    #[doc = "ID: 28"]
33258    RAW_PRESSURE(RAW_PRESSURE_DATA),
33259    #[doc = "RPM sensor data message."]
33260    #[doc = ""]
33261    #[doc = "ID: 339"]
33262    RAW_RPM(RAW_RPM_DATA),
33263    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33264    #[doc = ""]
33265    #[doc = "ID: 65"]
33266    RC_CHANNELS(RC_CHANNELS_DATA),
33267    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33268    #[doc = ""]
33269    #[doc = "ID: 70"]
33270    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33271    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33272    #[doc = ""]
33273    #[doc = "ID: 35"]
33274    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33275    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33276    #[doc = ""]
33277    #[doc = "ID: 34"]
33278    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33279    #[doc = "Request a data stream."]
33280    #[doc = ""]
33281    #[doc = "ID: 66"]
33282    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33283    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33284    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33285    #[doc = ""]
33286    #[doc = "ID: 412"]
33287    REQUEST_EVENT(REQUEST_EVENT_DATA),
33288    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33289    #[doc = ""]
33290    #[doc = "ID: 142"]
33291    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33292    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33293    #[doc = ""]
33294    #[doc = "ID: 413"]
33295    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33296    #[doc = "Read out the safety zone the MAV currently assumes."]
33297    #[doc = ""]
33298    #[doc = "ID: 55"]
33299    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33300    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33301    #[doc = ""]
33302    #[doc = "ID: 54"]
33303    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33304    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33305    #[doc = ""]
33306    #[doc = "ID: 26"]
33307    SCALED_IMU(SCALED_IMU_DATA),
33308    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33309    #[doc = ""]
33310    #[doc = "ID: 116"]
33311    SCALED_IMU2(SCALED_IMU2_DATA),
33312    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33313    #[doc = ""]
33314    #[doc = "ID: 129"]
33315    SCALED_IMU3(SCALED_IMU3_DATA),
33316    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33317    #[doc = ""]
33318    #[doc = "ID: 29"]
33319    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33320    #[doc = "Barometer readings for 2nd barometer."]
33321    #[doc = ""]
33322    #[doc = "ID: 137"]
33323    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33324    #[doc = "Barometer readings for 3rd barometer."]
33325    #[doc = ""]
33326    #[doc = "ID: 143"]
33327    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33328    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33329    #[doc = ""]
33330    #[doc = "ID: 126"]
33331    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33332    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33333    #[doc = ""]
33334    #[doc = "ID: 36"]
33335    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33336    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33337    #[doc = ""]
33338    #[doc = "ID: 256"]
33339    SETUP_SIGNING(SETUP_SIGNING_DATA),
33340    #[doc = "Set the vehicle attitude and body angular rates."]
33341    #[doc = ""]
33342    #[doc = "ID: 139"]
33343    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33344    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33345    #[doc = ""]
33346    #[doc = "ID: 82"]
33347    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33348    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33349    #[doc = ""]
33350    #[doc = "ID: 48"]
33351    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33352    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33353    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33354    #[doc = ""]
33355    #[doc = "ID: 243"]
33356    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33357    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33358    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33359    #[doc = ""]
33360    #[doc = "ID: 11"]
33361    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33362    SET_MODE(SET_MODE_DATA),
33363    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33364    #[doc = ""]
33365    #[doc = "ID: 86"]
33366    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33367    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33368    #[doc = ""]
33369    #[doc = "ID: 84"]
33370    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33371    #[doc = "Status of simulation environment, if used."]
33372    #[doc = ""]
33373    #[doc = "ID: 108"]
33374    SIM_STATE(SIM_STATE_DATA),
33375    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33376    #[doc = ""]
33377    #[doc = "ID: 370"]
33378    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33379    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33380    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33381    #[doc = ""]
33382    #[doc = "ID: 253"]
33383    STATUSTEXT(STATUSTEXT_DATA),
33384    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33385    #[doc = ""]
33386    #[doc = "ID: 261"]
33387    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33388    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33389    #[doc = ""]
33390    #[doc = "ID: 401"]
33391    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33392    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33393    #[doc = ""]
33394    #[doc = "ID: 2"]
33395    SYSTEM_TIME(SYSTEM_TIME_DATA),
33396    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33397    #[doc = ""]
33398    #[doc = "ID: 1"]
33399    SYS_STATUS(SYS_STATUS_DATA),
33400    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33401    #[doc = ""]
33402    #[doc = "ID: 135"]
33403    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33404    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33405    #[doc = ""]
33406    #[doc = "ID: 134"]
33407    TERRAIN_DATA(TERRAIN_DATA_DATA),
33408    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33409    #[doc = ""]
33410    #[doc = "ID: 136"]
33411    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33412    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33413    #[doc = ""]
33414    #[doc = "ID: 133"]
33415    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33416    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33417    #[doc = ""]
33418    #[doc = "ID: 111"]
33419    TIMESYNC(TIMESYNC_DATA),
33420    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33421    #[doc = ""]
33422    #[doc = "ID: 380"]
33423    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33424    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33425    #[doc = ""]
33426    #[doc = "ID: 333"]
33427    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33428    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33429    #[doc = ""]
33430    #[doc = "ID: 332"]
33431    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33432    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33433    #[doc = ""]
33434    #[doc = "ID: 385"]
33435    TUNNEL(TUNNEL_DATA),
33436    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33437    #[doc = ""]
33438    #[doc = "ID: 311"]
33439    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33440    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33441    #[doc = ""]
33442    #[doc = "ID: 310"]
33443    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33444    #[doc = "The global position resulting from GPS and sensor fusion."]
33445    #[doc = ""]
33446    #[doc = "ID: 340"]
33447    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33448    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33449    #[doc = ""]
33450    #[doc = "ID: 248"]
33451    V2_EXTENSION(V2_EXTENSION_DATA),
33452    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33453    #[doc = ""]
33454    #[doc = "ID: 74"]
33455    VFR_HUD(VFR_HUD_DATA),
33456    #[doc = "Vibration levels and accelerometer clipping."]
33457    #[doc = ""]
33458    #[doc = "ID: 241"]
33459    VIBRATION(VIBRATION_DATA),
33460    #[doc = "Global position estimate from a Vicon motion system source."]
33461    #[doc = ""]
33462    #[doc = "ID: 104"]
33463    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33464    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33465    #[doc = ""]
33466    #[doc = "ID: 269"]
33467    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33468    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33469    #[doc = ""]
33470    #[doc = "ID: 270"]
33471    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33472    #[doc = "Local position/attitude estimate from a vision source."]
33473    #[doc = ""]
33474    #[doc = "ID: 102"]
33475    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33476    #[doc = "Speed estimate from a vision source."]
33477    #[doc = ""]
33478    #[doc = "ID: 103"]
33479    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33480    #[doc = "Cumulative distance traveled for each reported wheel."]
33481    #[doc = ""]
33482    #[doc = "ID: 9000"]
33483    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33484    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33485    #[doc = ""]
33486    #[doc = "ID: 299"]
33487    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33488    #[doc = "Winch status."]
33489    #[doc = ""]
33490    #[doc = "ID: 9005"]
33491    WINCH_STATUS(WINCH_STATUS_DATA),
33492    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33493    #[doc = ""]
33494    #[doc = "ID: 231"]
33495    WIND_COV(WIND_COV_DATA),
33496}
33497impl MavMessage {
33498    pub const fn all_ids() -> &'static [u32] {
33499        &[
33500            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33501            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33502            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33503            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33504            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33505            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33506            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33507            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33508            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33509            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33510            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33511            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33512            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33513            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33514            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33515            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33516            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33517            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33518            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33519            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33520            12915u32, 12918u32, 12919u32, 12920u32, 50001u32, 50002u32, 50003u32, 50004u32,
33521            50005u32,
33522        ]
33523    }
33524    pub const fn all_messages() -> &'static [(&'static str, u32)] {
33525        &[
33526            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
33527            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
33528            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
33529            (PING_DATA::NAME, PING_DATA::ID),
33530            (
33531                CHANGE_OPERATOR_CONTROL_DATA::NAME,
33532                CHANGE_OPERATOR_CONTROL_DATA::ID,
33533            ),
33534            (
33535                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33536                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33537            ),
33538            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
33539            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
33540            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
33541            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
33542            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
33543            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
33544            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
33545            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
33546            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
33547            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
33548            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
33549            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
33550            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
33551            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
33552            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
33553            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
33554            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
33555            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
33556            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
33557            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
33558            (
33559                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33560                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33561            ),
33562            (
33563                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33564                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33565            ),
33566            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
33567            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
33568            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
33569            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
33570            (
33571                MISSION_REQUEST_LIST_DATA::NAME,
33572                MISSION_REQUEST_LIST_DATA::ID,
33573            ),
33574            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
33575            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
33576            (
33577                MISSION_ITEM_REACHED_DATA::NAME,
33578                MISSION_ITEM_REACHED_DATA::ID,
33579            ),
33580            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
33581            (
33582                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33583                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33584            ),
33585            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
33586            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
33587            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
33588            (
33589                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33590                SAFETY_SET_ALLOWED_AREA_DATA::ID,
33591            ),
33592            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
33593            (
33594                ATTITUDE_QUATERNION_COV_DATA::NAME,
33595                ATTITUDE_QUATERNION_COV_DATA::ID,
33596            ),
33597            (
33598                NAV_CONTROLLER_OUTPUT_DATA::NAME,
33599                NAV_CONTROLLER_OUTPUT_DATA::ID,
33600            ),
33601            (
33602                GLOBAL_POSITION_INT_COV_DATA::NAME,
33603                GLOBAL_POSITION_INT_COV_DATA::ID,
33604            ),
33605            (
33606                LOCAL_POSITION_NED_COV_DATA::NAME,
33607                LOCAL_POSITION_NED_COV_DATA::ID,
33608            ),
33609            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
33610            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
33611            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
33612            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
33613            (
33614                RC_CHANNELS_OVERRIDE_DATA::NAME,
33615                RC_CHANNELS_OVERRIDE_DATA::ID,
33616            ),
33617            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
33618            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
33619            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
33620            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
33621            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
33622            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
33623            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
33624            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
33625            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
33626            (
33627                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33628                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33629            ),
33630            (
33631                POSITION_TARGET_LOCAL_NED_DATA::NAME,
33632                POSITION_TARGET_LOCAL_NED_DATA::ID,
33633            ),
33634            (
33635                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33636                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33637            ),
33638            (
33639                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33640                POSITION_TARGET_GLOBAL_INT_DATA::ID,
33641            ),
33642            (
33643                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
33644                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
33645            ),
33646            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
33647            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
33648            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
33649            (
33650                HIL_ACTUATOR_CONTROLS_DATA::NAME,
33651                HIL_ACTUATOR_CONTROLS_DATA::ID,
33652            ),
33653            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
33654            (
33655                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33656                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33657            ),
33658            (
33659                VISION_POSITION_ESTIMATE_DATA::NAME,
33660                VISION_POSITION_ESTIMATE_DATA::ID,
33661            ),
33662            (
33663                VISION_SPEED_ESTIMATE_DATA::NAME,
33664                VISION_SPEED_ESTIMATE_DATA::ID,
33665            ),
33666            (
33667                VICON_POSITION_ESTIMATE_DATA::NAME,
33668                VICON_POSITION_ESTIMATE_DATA::ID,
33669            ),
33670            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
33671            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
33672            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
33673            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
33674            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
33675            (
33676                FILE_TRANSFER_PROTOCOL_DATA::NAME,
33677                FILE_TRANSFER_PROTOCOL_DATA::ID,
33678            ),
33679            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
33680            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
33681            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
33682            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
33683            (
33684                HIL_STATE_QUATERNION_DATA::NAME,
33685                HIL_STATE_QUATERNION_DATA::ID,
33686            ),
33687            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
33688            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
33689            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
33690            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
33691            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
33692            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
33693            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
33694            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
33695            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
33696            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
33697            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
33698            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
33699            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
33700            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
33701            (
33702                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33703                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33704            ),
33705            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
33706            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
33707            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
33708            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
33709            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
33710            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
33711            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
33712            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
33713            (
33714                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33715                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33716            ),
33717            (
33718                ACTUATOR_CONTROL_TARGET_DATA::NAME,
33719                ACTUATOR_CONTROL_TARGET_DATA::ID,
33720            ),
33721            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
33722            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
33723            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
33724            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
33725            (
33726                CONTROL_SYSTEM_STATE_DATA::NAME,
33727                CONTROL_SYSTEM_STATE_DATA::ID,
33728            ),
33729            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
33730            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
33731            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
33732            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
33733            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
33734            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
33735            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
33736            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
33737            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
33738            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
33739            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
33740            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
33741            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
33742            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
33743            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
33744            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
33745            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
33746            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
33747            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
33748            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
33749            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
33750            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
33751            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
33752            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
33753            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
33754            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
33755            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
33756            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
33757            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
33758            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
33759            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
33760            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
33761            (
33762                CAMERA_CAPTURE_STATUS_DATA::NAME,
33763                CAMERA_CAPTURE_STATUS_DATA::ID,
33764            ),
33765            (
33766                CAMERA_IMAGE_CAPTURED_DATA::NAME,
33767                CAMERA_IMAGE_CAPTURED_DATA::ID,
33768            ),
33769            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
33770            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
33771            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
33772            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
33773            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
33774            (
33775                VIDEO_STREAM_INFORMATION_DATA::NAME,
33776                VIDEO_STREAM_INFORMATION_DATA::ID,
33777            ),
33778            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
33779            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
33780            (
33781                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33782                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33783            ),
33784            (
33785                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33786                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33787            ),
33788            (
33789                CAMERA_THERMAL_RANGE_DATA::NAME,
33790                CAMERA_THERMAL_RANGE_DATA::ID,
33791            ),
33792            (
33793                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33794                GIMBAL_MANAGER_INFORMATION_DATA::ID,
33795            ),
33796            (
33797                GIMBAL_MANAGER_STATUS_DATA::NAME,
33798                GIMBAL_MANAGER_STATUS_DATA::ID,
33799            ),
33800            (
33801                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33802                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33803            ),
33804            (
33805                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33806                GIMBAL_DEVICE_INFORMATION_DATA::ID,
33807            ),
33808            (
33809                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33810                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33811            ),
33812            (
33813                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33814                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33815            ),
33816            (
33817                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
33818                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
33819            ),
33820            (
33821                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33822                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33823            ),
33824            (
33825                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
33826                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
33827            ),
33828            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
33829            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
33830            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
33831            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
33832            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
33833            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
33834            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
33835            (
33836                PARAM_EXT_REQUEST_READ_DATA::NAME,
33837                PARAM_EXT_REQUEST_READ_DATA::ID,
33838            ),
33839            (
33840                PARAM_EXT_REQUEST_LIST_DATA::NAME,
33841                PARAM_EXT_REQUEST_LIST_DATA::ID,
33842            ),
33843            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
33844            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
33845            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
33846            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
33847            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
33848            (
33849                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
33850                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
33851            ),
33852            (
33853                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
33854                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33855            ),
33856            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
33857            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
33858            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
33859            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
33860            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
33861            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
33862            (
33863                ORBIT_EXECUTION_STATUS_DATA::NAME,
33864                ORBIT_EXECUTION_STATUS_DATA::ID,
33865            ),
33866            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
33867            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
33868            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
33869            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
33870            (
33871                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
33872                ACTUATOR_OUTPUT_STATUS_DATA::ID,
33873            ),
33874            (
33875                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33876                TIME_ESTIMATE_TO_TARGET_DATA::ID,
33877            ),
33878            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
33879            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
33880            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
33881            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
33882            (
33883                ONBOARD_COMPUTER_STATUS_DATA::NAME,
33884                ONBOARD_COMPUTER_STATUS_DATA::ID,
33885            ),
33886            (
33887                COMPONENT_INFORMATION_DATA::NAME,
33888                COMPONENT_INFORMATION_DATA::ID,
33889            ),
33890            (
33891                COMPONENT_INFORMATION_BASIC_DATA::NAME,
33892                COMPONENT_INFORMATION_BASIC_DATA::ID,
33893            ),
33894            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
33895            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
33896            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
33897            (EVENT_DATA::NAME, EVENT_DATA::ID),
33898            (
33899                CURRENT_EVENT_SEQUENCE_DATA::NAME,
33900                CURRENT_EVENT_SEQUENCE_DATA::ID,
33901            ),
33902            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
33903            (
33904                RESPONSE_EVENT_ERROR_DATA::NAME,
33905                RESPONSE_EVENT_ERROR_DATA::ID,
33906            ),
33907            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
33908            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
33909            (
33910                AVAILABLE_MODES_MONITOR_DATA::NAME,
33911                AVAILABLE_MODES_MONITOR_DATA::ID,
33912            ),
33913            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
33914            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
33915            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
33916            (
33917                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33918                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33919            ),
33920            (
33921                OPEN_DRONE_ID_LOCATION_DATA::NAME,
33922                OPEN_DRONE_ID_LOCATION_DATA::ID,
33923            ),
33924            (
33925                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33926                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33927            ),
33928            (
33929                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33930                OPEN_DRONE_ID_SELF_ID_DATA::ID,
33931            ),
33932            (
33933                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33934                OPEN_DRONE_ID_SYSTEM_DATA::ID,
33935            ),
33936            (
33937                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33938                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33939            ),
33940            (
33941                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33942                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33943            ),
33944            (
33945                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33946                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33947            ),
33948            (
33949                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33950                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33951            ),
33952            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
33953            (CUBEPILOT_RAW_RC_DATA::NAME, CUBEPILOT_RAW_RC_DATA::ID),
33954            (
33955                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME,
33956                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID,
33957            ),
33958            (HERELINK_TELEM_DATA::NAME, HERELINK_TELEM_DATA::ID),
33959            (
33960                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
33961                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
33962            ),
33963            (
33964                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
33965                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
33966            ),
33967        ]
33968    }
33969}
33970impl Message for MavMessage {
33971    fn parse(
33972        version: MavlinkVersion,
33973        id: u32,
33974        payload: &[u8],
33975    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33976        match id {
33977            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33978                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33979                    .map(Self::ACTUATOR_CONTROL_TARGET)
33980            }
33981            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33982                .map(Self::ACTUATOR_OUTPUT_STATUS),
33983            ADSB_VEHICLE_DATA::ID => {
33984                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33985            }
33986            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33987            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33988            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33989            ATTITUDE_QUATERNION_DATA::ID => {
33990                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33991            }
33992            ATTITUDE_QUATERNION_COV_DATA::ID => {
33993                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33994                    .map(Self::ATTITUDE_QUATERNION_COV)
33995            }
33996            ATTITUDE_TARGET_DATA::ID => {
33997                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33998            }
33999            ATT_POS_MOCAP_DATA::ID => {
34000                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34001            }
34002            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34003            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34004                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34005                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34006            }
34007            AUTOPILOT_VERSION_DATA::ID => {
34008                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34009            }
34010            AVAILABLE_MODES_DATA::ID => {
34011                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34012            }
34013            AVAILABLE_MODES_MONITOR_DATA::ID => {
34014                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34015                    .map(Self::AVAILABLE_MODES_MONITOR)
34016            }
34017            BATTERY_INFO_DATA::ID => {
34018                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34019            }
34020            BATTERY_STATUS_DATA::ID => {
34021                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34022            }
34023            BUTTON_CHANGE_DATA::ID => {
34024                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34025            }
34026            CAMERA_CAPTURE_STATUS_DATA::ID => {
34027                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34028            }
34029            CAMERA_FOV_STATUS_DATA::ID => {
34030                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34031            }
34032            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34033                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34034            }
34035            CAMERA_INFORMATION_DATA::ID => {
34036                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34037            }
34038            CAMERA_SETTINGS_DATA::ID => {
34039                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34040            }
34041            CAMERA_THERMAL_RANGE_DATA::ID => {
34042                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34043            }
34044            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34045                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34046                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34047            }
34048            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34049                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34050                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34051            }
34052            CAMERA_TRIGGER_DATA::ID => {
34053                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34054            }
34055            CANFD_FRAME_DATA::ID => {
34056                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34057            }
34058            CAN_FILTER_MODIFY_DATA::ID => {
34059                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34060            }
34061            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34062            CELLULAR_CONFIG_DATA::ID => {
34063                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34064            }
34065            CELLULAR_STATUS_DATA::ID => {
34066                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34067            }
34068            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34069                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34070                    .map(Self::CHANGE_OPERATOR_CONTROL)
34071            }
34072            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34073                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34074                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34075            }
34076            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34077            COMMAND_ACK_DATA::ID => {
34078                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34079            }
34080            COMMAND_CANCEL_DATA::ID => {
34081                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34082            }
34083            COMMAND_INT_DATA::ID => {
34084                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34085            }
34086            COMMAND_LONG_DATA::ID => {
34087                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34088            }
34089            COMPONENT_INFORMATION_DATA::ID => {
34090                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34091            }
34092            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34093                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34094                    .map(Self::COMPONENT_INFORMATION_BASIC)
34095            }
34096            COMPONENT_METADATA_DATA::ID => {
34097                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34098            }
34099            CONTROL_SYSTEM_STATE_DATA::ID => {
34100                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34101            }
34102            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
34103                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
34104                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
34105            }
34106            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
34107                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
34108                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
34109            }
34110            CUBEPILOT_RAW_RC_DATA::ID => {
34111                CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
34112            }
34113            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34114                .map(Self::CURRENT_EVENT_SEQUENCE),
34115            CURRENT_MODE_DATA::ID => {
34116                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34117            }
34118            DATA_STREAM_DATA::ID => {
34119                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34120            }
34121            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34122                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34123                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34124            }
34125            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34126            DEBUG_FLOAT_ARRAY_DATA::ID => {
34127                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34128            }
34129            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34130            DISTANCE_SENSOR_DATA::ID => {
34131                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34132            }
34133            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34134            ENCAPSULATED_DATA_DATA::ID => {
34135                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34136            }
34137            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34138            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34139            ESTIMATOR_STATUS_DATA::ID => {
34140                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34141            }
34142            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34143            EXTENDED_SYS_STATE_DATA::ID => {
34144                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34145            }
34146            FENCE_STATUS_DATA::ID => {
34147                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34148            }
34149            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34150                .map(Self::FILE_TRANSFER_PROTOCOL),
34151            FLIGHT_INFORMATION_DATA::ID => {
34152                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34153            }
34154            FOLLOW_TARGET_DATA::ID => {
34155                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34156            }
34157            FUEL_STATUS_DATA::ID => {
34158                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34159            }
34160            GENERATOR_STATUS_DATA::ID => {
34161                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34162            }
34163            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34164                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34165                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34166            }
34167            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34168                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34169                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34170            }
34171            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34172                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34173                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34174            }
34175            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34176                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34177                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34178            }
34179            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34180                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34181                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34182            }
34183            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34184                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34185                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34186            }
34187            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34188                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34189                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34190            }
34191            GIMBAL_MANAGER_STATUS_DATA::ID => {
34192                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34193            }
34194            GLOBAL_POSITION_INT_DATA::ID => {
34195                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34196            }
34197            GLOBAL_POSITION_INT_COV_DATA::ID => {
34198                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34199                    .map(Self::GLOBAL_POSITION_INT_COV)
34200            }
34201            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34202                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34203                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34204            }
34205            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34206            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34207            GPS_GLOBAL_ORIGIN_DATA::ID => {
34208                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34209            }
34210            GPS_INJECT_DATA_DATA::ID => {
34211                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34212            }
34213            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34214            GPS_RAW_INT_DATA::ID => {
34215                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34216            }
34217            GPS_RTCM_DATA_DATA::ID => {
34218                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34219            }
34220            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34221            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34222            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34223            HERELINK_TELEM_DATA::ID => {
34224                HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
34225            }
34226            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
34227                HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34228                    .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
34229            }
34230            HIGHRES_IMU_DATA::ID => {
34231                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34232            }
34233            HIGH_LATENCY_DATA::ID => {
34234                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34235            }
34236            HIGH_LATENCY2_DATA::ID => {
34237                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34238            }
34239            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34240                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34241            }
34242            HIL_CONTROLS_DATA::ID => {
34243                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34244            }
34245            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34246            HIL_OPTICAL_FLOW_DATA::ID => {
34247                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34248            }
34249            HIL_RC_INPUTS_RAW_DATA::ID => {
34250                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34251            }
34252            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34253            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34254            HIL_STATE_QUATERNION_DATA::ID => {
34255                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34256            }
34257            HOME_POSITION_DATA::ID => {
34258                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34259            }
34260            HYGROMETER_SENSOR_DATA::ID => {
34261                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34262            }
34263            ILLUMINATOR_STATUS_DATA::ID => {
34264                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34265            }
34266            ISBD_LINK_STATUS_DATA::ID => {
34267                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34268            }
34269            LANDING_TARGET_DATA::ID => {
34270                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34271            }
34272            LINK_NODE_STATUS_DATA::ID => {
34273                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34274            }
34275            LOCAL_POSITION_NED_DATA::ID => {
34276                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34277            }
34278            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34279                .map(Self::LOCAL_POSITION_NED_COV),
34280            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34281                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34282                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34283            }
34284            LOGGING_ACK_DATA::ID => {
34285                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34286            }
34287            LOGGING_DATA_DATA::ID => {
34288                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34289            }
34290            LOGGING_DATA_ACKED_DATA::ID => {
34291                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34292            }
34293            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34294            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34295            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34296            LOG_REQUEST_DATA_DATA::ID => {
34297                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34298            }
34299            LOG_REQUEST_END_DATA::ID => {
34300                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34301            }
34302            LOG_REQUEST_LIST_DATA::ID => {
34303                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34304            }
34305            MAG_CAL_REPORT_DATA::ID => {
34306                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34307            }
34308            MANUAL_CONTROL_DATA::ID => {
34309                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34310            }
34311            MANUAL_SETPOINT_DATA::ID => {
34312                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34313            }
34314            MEMORY_VECT_DATA::ID => {
34315                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34316            }
34317            MESSAGE_INTERVAL_DATA::ID => {
34318                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34319            }
34320            MISSION_ACK_DATA::ID => {
34321                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34322            }
34323            MISSION_CLEAR_ALL_DATA::ID => {
34324                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34325            }
34326            MISSION_COUNT_DATA::ID => {
34327                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34328            }
34329            MISSION_CURRENT_DATA::ID => {
34330                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34331            }
34332            MISSION_ITEM_DATA::ID => {
34333                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34334            }
34335            MISSION_ITEM_INT_DATA::ID => {
34336                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34337            }
34338            MISSION_ITEM_REACHED_DATA::ID => {
34339                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34340            }
34341            MISSION_REQUEST_DATA::ID => {
34342                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34343            }
34344            MISSION_REQUEST_INT_DATA::ID => {
34345                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34346            }
34347            MISSION_REQUEST_LIST_DATA::ID => {
34348                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34349            }
34350            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34351                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34352                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34353            }
34354            MISSION_SET_CURRENT_DATA::ID => {
34355                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34356            }
34357            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34358                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34359                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34360            }
34361            MOUNT_ORIENTATION_DATA::ID => {
34362                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34363            }
34364            NAMED_VALUE_FLOAT_DATA::ID => {
34365                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34366            }
34367            NAMED_VALUE_INT_DATA::ID => {
34368                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34369            }
34370            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34371                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34372            }
34373            OBSTACLE_DISTANCE_DATA::ID => {
34374                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34375            }
34376            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34377            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34378                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34379                    .map(Self::ONBOARD_COMPUTER_STATUS)
34380            }
34381            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34382                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34383                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34384            }
34385            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34386                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34387                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34388            }
34389            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34390                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34391            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34392                .map(Self::OPEN_DRONE_ID_LOCATION),
34393            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34394                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34395                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34396            }
34397            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34398                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34399                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34400            }
34401            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34402                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34403            }
34404            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34405                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34406            }
34407            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34408                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34409                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34410            }
34411            OPTICAL_FLOW_DATA::ID => {
34412                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34413            }
34414            OPTICAL_FLOW_RAD_DATA::ID => {
34415                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34416            }
34417            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34418                .map(Self::ORBIT_EXECUTION_STATUS),
34419            PARAM_EXT_ACK_DATA::ID => {
34420                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34421            }
34422            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34423                .map(Self::PARAM_EXT_REQUEST_LIST),
34424            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34425                .map(Self::PARAM_EXT_REQUEST_READ),
34426            PARAM_EXT_SET_DATA::ID => {
34427                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34428            }
34429            PARAM_EXT_VALUE_DATA::ID => {
34430                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34431            }
34432            PARAM_MAP_RC_DATA::ID => {
34433                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34434            }
34435            PARAM_REQUEST_LIST_DATA::ID => {
34436                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34437            }
34438            PARAM_REQUEST_READ_DATA::ID => {
34439                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34440            }
34441            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34442            PARAM_VALUE_DATA::ID => {
34443                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34444            }
34445            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34446            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34447            PLAY_TUNE_V2_DATA::ID => {
34448                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34449            }
34450            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34451                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34452                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34453            }
34454            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34455                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34456                    .map(Self::POSITION_TARGET_LOCAL_NED)
34457            }
34458            POWER_STATUS_DATA::ID => {
34459                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34460            }
34461            PROTOCOL_VERSION_DATA::ID => {
34462                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34463            }
34464            RADIO_STATUS_DATA::ID => {
34465                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34466            }
34467            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34468            RAW_PRESSURE_DATA::ID => {
34469                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34470            }
34471            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34472            RC_CHANNELS_DATA::ID => {
34473                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34474            }
34475            RC_CHANNELS_OVERRIDE_DATA::ID => {
34476                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34477            }
34478            RC_CHANNELS_RAW_DATA::ID => {
34479                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34480            }
34481            RC_CHANNELS_SCALED_DATA::ID => {
34482                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34483            }
34484            REQUEST_DATA_STREAM_DATA::ID => {
34485                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34486            }
34487            REQUEST_EVENT_DATA::ID => {
34488                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34489            }
34490            RESOURCE_REQUEST_DATA::ID => {
34491                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34492            }
34493            RESPONSE_EVENT_ERROR_DATA::ID => {
34494                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34495            }
34496            SAFETY_ALLOWED_AREA_DATA::ID => {
34497                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34498            }
34499            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34500                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34501                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34502            }
34503            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34504            SCALED_IMU2_DATA::ID => {
34505                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34506            }
34507            SCALED_IMU3_DATA::ID => {
34508                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34509            }
34510            SCALED_PRESSURE_DATA::ID => {
34511                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34512            }
34513            SCALED_PRESSURE2_DATA::ID => {
34514                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34515            }
34516            SCALED_PRESSURE3_DATA::ID => {
34517                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34518            }
34519            SERIAL_CONTROL_DATA::ID => {
34520                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34521            }
34522            SERVO_OUTPUT_RAW_DATA::ID => {
34523                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34524            }
34525            SETUP_SIGNING_DATA::ID => {
34526                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34527            }
34528            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34529                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34530                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34531            }
34532            SET_ATTITUDE_TARGET_DATA::ID => {
34533                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34534            }
34535            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34536                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34537            }
34538            SET_HOME_POSITION_DATA::ID => {
34539                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34540            }
34541            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34542            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34543                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34544                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34545            }
34546            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34547                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34548                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34549            }
34550            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34551            SMART_BATTERY_INFO_DATA::ID => {
34552                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34553            }
34554            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34555            STORAGE_INFORMATION_DATA::ID => {
34556                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34557            }
34558            SUPPORTED_TUNES_DATA::ID => {
34559                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34560            }
34561            SYSTEM_TIME_DATA::ID => {
34562                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34563            }
34564            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34565            TERRAIN_CHECK_DATA::ID => {
34566                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34567            }
34568            TERRAIN_DATA_DATA::ID => {
34569                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34570            }
34571            TERRAIN_REPORT_DATA::ID => {
34572                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34573            }
34574            TERRAIN_REQUEST_DATA::ID => {
34575                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34576            }
34577            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34578            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34579                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34580                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34581            }
34582            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34583                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34584                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34585            }
34586            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34587                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34588                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34589            }
34590            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34591            UAVCAN_NODE_INFO_DATA::ID => {
34592                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34593            }
34594            UAVCAN_NODE_STATUS_DATA::ID => {
34595                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34596            }
34597            UTM_GLOBAL_POSITION_DATA::ID => {
34598                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34599            }
34600            V2_EXTENSION_DATA::ID => {
34601                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34602            }
34603            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34604            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34605            VICON_POSITION_ESTIMATE_DATA::ID => {
34606                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34607                    .map(Self::VICON_POSITION_ESTIMATE)
34608            }
34609            VIDEO_STREAM_INFORMATION_DATA::ID => {
34610                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34611                    .map(Self::VIDEO_STREAM_INFORMATION)
34612            }
34613            VIDEO_STREAM_STATUS_DATA::ID => {
34614                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34615            }
34616            VISION_POSITION_ESTIMATE_DATA::ID => {
34617                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34618                    .map(Self::VISION_POSITION_ESTIMATE)
34619            }
34620            VISION_SPEED_ESTIMATE_DATA::ID => {
34621                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34622            }
34623            WHEEL_DISTANCE_DATA::ID => {
34624                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34625            }
34626            WIFI_CONFIG_AP_DATA::ID => {
34627                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34628            }
34629            WINCH_STATUS_DATA::ID => {
34630                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34631            }
34632            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34633            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34634        }
34635    }
34636    fn message_name(&self) -> &'static str {
34637        match self {
34638            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34639            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34640            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34641            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34642            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34643            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34644            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34645            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34646            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34647            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34648            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34649            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34650                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34651            }
34652            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34653            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34654            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34655            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34656            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34657            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34658            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34659            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34660            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34661            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34662            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34663            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34664            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34665            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34666            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34667            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34668            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34669            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34670            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34671            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34672            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34673            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34674            Self::COLLISION(..) => COLLISION_DATA::NAME,
34675            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34676            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34677            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34678            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34679            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34680            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34681            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34682            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34683            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
34684            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
34685            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
34686            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34687            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34688            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34689            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34690            Self::DEBUG(..) => DEBUG_DATA::NAME,
34691            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34692            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34693            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34694            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34695            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34696            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34697            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34698            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34699            Self::EVENT(..) => EVENT_DATA::NAME,
34700            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34701            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34702            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34703            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34704            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34705            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34706            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34707            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34708            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34709            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34710            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34711            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34712            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34713                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34714            }
34715            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34716            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34717            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34718            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34719            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34720            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34721            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34722            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34723            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34724            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34725            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34726            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34727            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34728            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34729            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34730            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
34731            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34732                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
34733            }
34734            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34735            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34736            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34737            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34738            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34739            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34740            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34741            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34742            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34743            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34744            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34745            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34746            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34747            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34748            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34749            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34750            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34751            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34752            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34753            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34754                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34755            }
34756            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34757            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34758            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34759            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34760            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34761            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34762            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34763            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34764            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34765            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34766            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34767            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34768            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34769            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34770            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34771            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34772            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34773            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34774            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34775            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34776            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34777            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34778            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34779            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34780            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34781            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34782            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34783            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34784            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34785            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34786            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34787            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34788            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34789            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34790            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34791            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34792            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34793            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34794            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34795            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34796            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34797            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34798            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34799            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34800            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34801            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34802            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34803            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34804            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34805            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34806            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34807            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34808            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34809            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34810            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34811            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34812            Self::PING(..) => PING_DATA::NAME,
34813            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34814            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34815            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34816            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34817            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34818            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34819            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34820            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34821            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34822            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34823            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34824            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34825            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34826            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34827            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34828            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34829            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34830            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34831            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34832            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34833            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34834            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34835            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34836            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34837            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34838            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34839            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34840            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34841            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34842            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34843            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34844            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34845            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34846            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34847            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34848            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34849            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34850            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34851            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34852            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34853            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34854            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34855            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34856            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34857            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34858            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34859            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34860            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34861            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34862            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34863                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34864            }
34865            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34866                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34867            }
34868            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34869            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34870            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34871            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34872            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34873            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34874            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34875            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34876            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34877            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34878            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34879            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34880            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34881            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34882            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34883            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34884        }
34885    }
34886    fn message_id(&self) -> u32 {
34887        match self {
34888            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34889            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34890            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34891            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34892            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34893            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34894            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34895            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34896            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34897            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34898            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34899            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34900                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34901            }
34902            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34903            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34904            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34905            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34906            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34907            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34908            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34909            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34910            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34911            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34912            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34913            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34914            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34915            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34916            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34917            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34918            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34919            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34920            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34921            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34922            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34923            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34924            Self::COLLISION(..) => COLLISION_DATA::ID,
34925            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34926            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34927            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34928            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34929            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34930            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34931            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34932            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34933            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
34934            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
34935            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
34936            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34937            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34938            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34939            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34940            Self::DEBUG(..) => DEBUG_DATA::ID,
34941            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34942            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34943            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34944            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34945            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34946            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34947            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34948            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34949            Self::EVENT(..) => EVENT_DATA::ID,
34950            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34951            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34952            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34953            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34954            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34955            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34956            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34957            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34958            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34959            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34960            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34961            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34962            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34963                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34964            }
34965            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34966            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34967            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34968            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34969            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34970            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34971            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34972            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34973            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34974            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34975            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34976            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34977            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34978            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34979            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34980            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
34981            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34982                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
34983            }
34984            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34985            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34986            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34987            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34988            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34989            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34990            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34991            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34992            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34993            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34994            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34995            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34996            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34997            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34998            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34999            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35000            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35001            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35002            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35003            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35004                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35005            }
35006            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35007            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35008            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35009            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35010            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35011            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35012            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35013            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35014            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35015            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35016            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35017            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35018            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35019            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35020            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35021            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35022            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35023            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35024            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35025            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35026            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35027            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35028            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35029            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35030            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35031            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35032            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35033            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35034            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35035            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35036            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35037            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35038            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35039            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35040            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35041            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35042            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35043            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35044            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35045            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35046            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35047            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35048            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35049            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35050            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35051            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35052            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35053            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35054            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35055            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35056            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35057            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35058            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35059            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35060            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35061            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35062            Self::PING(..) => PING_DATA::ID,
35063            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35064            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35065            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35066            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35067            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35068            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35069            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35070            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35071            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35072            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35073            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35074            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35075            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35076            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35077            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35078            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35079            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35080            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35081            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35082            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35083            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35084            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35085            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35086            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35087            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35088            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35089            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35090            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35091            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35092            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35093            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35094            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35095            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35096            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35097            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35098            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35099            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35100            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35101            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35102            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35103            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35104            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35105            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35106            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35107            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35108            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35109            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35110            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35111            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35112            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35113            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35114                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35115            }
35116            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35117            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35118            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35119            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35120            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35121            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35122            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35123            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35124            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35125            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35126            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35127            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35128            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35129            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35130            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35131            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35132        }
35133    }
35134    fn message_id_from_name(name: &str) -> Option<u32> {
35135        match name {
35136            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35137            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35138            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35139            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35140            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35141            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35142            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35143            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35144            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35145            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35146            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35147            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35148                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35149            }
35150            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35151            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35152            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35153            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35154            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35155            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35156            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35157            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35158            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35159            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35160            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35161            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35162            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35163            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35164            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35165            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35166            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35167            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35168            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35169            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35170            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35171            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35172            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35173            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35174            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35175            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35176            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35177            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35178            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35179            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35180            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35181            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
35182                Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
35183            }
35184            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
35185                Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
35186            }
35187            CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
35188            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35189            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35190            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35191            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35192            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35193            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35194            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35195            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35196            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35197            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35198            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35199            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35200            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35201            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35202            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35203            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35204            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35205            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35206            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35207            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35208            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35209            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35210                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35211            }
35212            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35213            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35214            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35215            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35216            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35217                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35218            }
35219            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35220            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35221            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35222            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35223            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35224                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35225            }
35226            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35227            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35228            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35229            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35230            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35231            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35232            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35233            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35234            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35235            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35236            HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
35237            HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
35238                Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
35239            }
35240            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35241            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35242            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35243            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35244            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35245            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35246            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35247            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35248            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35249            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35250            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35251            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35252            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35253            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35254            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35255            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35256            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35257            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35258            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35259            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35260                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35261            }
35262            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35263            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35264            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35265            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35266            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35267            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35268            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35269            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35270            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35271            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35272            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35273            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35274            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35275            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35276            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35277            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35278            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35279            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35280            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35281            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35282            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35283            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35284            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35285            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35286            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35287            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35288            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35289            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35290            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35291            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35292            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35293            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35294            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35295            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35296            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35297            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35298            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35299            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35300            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35301            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35302            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35303            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35304            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35305            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35306            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35307            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35308            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35309            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35310            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35311            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35312            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35313            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35314            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35315            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35316            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35317            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35318            PING_DATA::NAME => Some(PING_DATA::ID),
35319            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35320            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35321            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35322            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35323            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35324            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35325            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35326            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35327            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35328            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35329            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35330            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35331            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35332            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35333            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35334            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35335            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35336            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35337            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35338            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35339            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35340            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35341            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35342            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35343            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35344            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35345            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35346            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35347            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35348            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35349            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35350            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35351            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35352            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35353            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35354                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35355            }
35356            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35357                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35358            }
35359            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35360            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35361            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35362            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35363            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35364            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35365            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35366            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35367            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35368            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35369            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35370            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35371            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35372            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35373                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35374            }
35375            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35376                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35377            }
35378            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35379            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35380            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35381            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35382            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35383            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35384            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35385            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35386            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35387            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35388            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35389            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35390            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35391            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35392            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35393            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35394            _ => None,
35395        }
35396    }
35397    fn default_message_from_id(id: u32) -> Option<Self> {
35398        match id {
35399            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35400                ACTUATOR_CONTROL_TARGET_DATA::default(),
35401            )),
35402            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35403                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35404            )),
35405            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35406            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35407            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35408            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35409            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35410                ATTITUDE_QUATERNION_DATA::default(),
35411            )),
35412            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35413                ATTITUDE_QUATERNION_COV_DATA::default(),
35414            )),
35415            ATTITUDE_TARGET_DATA::ID => {
35416                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35417            }
35418            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35419            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35420            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35421                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35422                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35423                ))
35424            }
35425            AUTOPILOT_VERSION_DATA::ID => {
35426                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35427            }
35428            AVAILABLE_MODES_DATA::ID => {
35429                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35430            }
35431            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35432                AVAILABLE_MODES_MONITOR_DATA::default(),
35433            )),
35434            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35435            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35436            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35437            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35438                CAMERA_CAPTURE_STATUS_DATA::default(),
35439            )),
35440            CAMERA_FOV_STATUS_DATA::ID => {
35441                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35442            }
35443            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35444                CAMERA_IMAGE_CAPTURED_DATA::default(),
35445            )),
35446            CAMERA_INFORMATION_DATA::ID => {
35447                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35448            }
35449            CAMERA_SETTINGS_DATA::ID => {
35450                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35451            }
35452            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35453                CAMERA_THERMAL_RANGE_DATA::default(),
35454            )),
35455            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35456                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35457            )),
35458            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35459                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35460            )),
35461            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35462            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35463            CAN_FILTER_MODIFY_DATA::ID => {
35464                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35465            }
35466            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35467            CELLULAR_CONFIG_DATA::ID => {
35468                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35469            }
35470            CELLULAR_STATUS_DATA::ID => {
35471                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35472            }
35473            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35474                CHANGE_OPERATOR_CONTROL_DATA::default(),
35475            )),
35476            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35477                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35478            )),
35479            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35480            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35481            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35482            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35483            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35484            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35485                COMPONENT_INFORMATION_DATA::default(),
35486            )),
35487            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35488                COMPONENT_INFORMATION_BASIC_DATA::default(),
35489            )),
35490            COMPONENT_METADATA_DATA::ID => {
35491                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35492            }
35493            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35494                CONTROL_SYSTEM_STATE_DATA::default(),
35495            )),
35496            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
35497                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
35498            )),
35499            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35500                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
35501                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
35502                ))
35503            }
35504            CUBEPILOT_RAW_RC_DATA::ID => {
35505                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
35506            }
35507            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35508                CURRENT_EVENT_SEQUENCE_DATA::default(),
35509            )),
35510            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35511            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35512            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35513                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35514            )),
35515            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35516            DEBUG_FLOAT_ARRAY_DATA::ID => {
35517                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35518            }
35519            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35520            DISTANCE_SENSOR_DATA::ID => {
35521                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35522            }
35523            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35524            ENCAPSULATED_DATA_DATA::ID => {
35525                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35526            }
35527            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35528            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35529            ESTIMATOR_STATUS_DATA::ID => {
35530                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35531            }
35532            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35533            EXTENDED_SYS_STATE_DATA::ID => {
35534                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35535            }
35536            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35537            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35538                FILE_TRANSFER_PROTOCOL_DATA::default(),
35539            )),
35540            FLIGHT_INFORMATION_DATA::ID => {
35541                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35542            }
35543            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35544            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35545            GENERATOR_STATUS_DATA::ID => {
35546                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35547            }
35548            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35549                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35550            )),
35551            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35552                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35553            )),
35554            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35555                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35556            )),
35557            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35558                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35559            )),
35560            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35561                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35562            )),
35563            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35564                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35565                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35566                ))
35567            }
35568            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35569                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35570            )),
35571            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35572                GIMBAL_MANAGER_STATUS_DATA::default(),
35573            )),
35574            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35575                GLOBAL_POSITION_INT_DATA::default(),
35576            )),
35577            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35578                GLOBAL_POSITION_INT_COV_DATA::default(),
35579            )),
35580            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35581                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35582                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35583                ))
35584            }
35585            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35586            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35587            GPS_GLOBAL_ORIGIN_DATA::ID => {
35588                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35589            }
35590            GPS_INJECT_DATA_DATA::ID => {
35591                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35592            }
35593            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35594            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35595            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35596            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35597            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35598            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35599            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
35600            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
35601                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
35602                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
35603                ))
35604            }
35605            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35606            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35607            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35608            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35609                HIL_ACTUATOR_CONTROLS_DATA::default(),
35610            )),
35611            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35612            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35613            HIL_OPTICAL_FLOW_DATA::ID => {
35614                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35615            }
35616            HIL_RC_INPUTS_RAW_DATA::ID => {
35617                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35618            }
35619            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35620            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35621            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35622                HIL_STATE_QUATERNION_DATA::default(),
35623            )),
35624            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35625            HYGROMETER_SENSOR_DATA::ID => {
35626                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35627            }
35628            ILLUMINATOR_STATUS_DATA::ID => {
35629                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35630            }
35631            ISBD_LINK_STATUS_DATA::ID => {
35632                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35633            }
35634            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35635            LINK_NODE_STATUS_DATA::ID => {
35636                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35637            }
35638            LOCAL_POSITION_NED_DATA::ID => {
35639                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35640            }
35641            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35642                LOCAL_POSITION_NED_COV_DATA::default(),
35643            )),
35644            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35645                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35646                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35647                ))
35648            }
35649            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35650            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35651            LOGGING_DATA_ACKED_DATA::ID => {
35652                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35653            }
35654            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35655            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35656            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35657            LOG_REQUEST_DATA_DATA::ID => {
35658                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35659            }
35660            LOG_REQUEST_END_DATA::ID => {
35661                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35662            }
35663            LOG_REQUEST_LIST_DATA::ID => {
35664                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35665            }
35666            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35667            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35668            MANUAL_SETPOINT_DATA::ID => {
35669                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35670            }
35671            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35672            MESSAGE_INTERVAL_DATA::ID => {
35673                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35674            }
35675            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35676            MISSION_CLEAR_ALL_DATA::ID => {
35677                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35678            }
35679            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35680            MISSION_CURRENT_DATA::ID => {
35681                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35682            }
35683            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35684            MISSION_ITEM_INT_DATA::ID => {
35685                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35686            }
35687            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35688                MISSION_ITEM_REACHED_DATA::default(),
35689            )),
35690            MISSION_REQUEST_DATA::ID => {
35691                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35692            }
35693            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35694                MISSION_REQUEST_INT_DATA::default(),
35695            )),
35696            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35697                MISSION_REQUEST_LIST_DATA::default(),
35698            )),
35699            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35700                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35701            )),
35702            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35703                MISSION_SET_CURRENT_DATA::default(),
35704            )),
35705            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35706                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35707            )),
35708            MOUNT_ORIENTATION_DATA::ID => {
35709                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35710            }
35711            NAMED_VALUE_FLOAT_DATA::ID => {
35712                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35713            }
35714            NAMED_VALUE_INT_DATA::ID => {
35715                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35716            }
35717            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35718                NAV_CONTROLLER_OUTPUT_DATA::default(),
35719            )),
35720            OBSTACLE_DISTANCE_DATA::ID => {
35721                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35722            }
35723            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35724            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35725                ONBOARD_COMPUTER_STATUS_DATA::default(),
35726            )),
35727            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35728                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35729            )),
35730            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35731                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35732            )),
35733            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35734                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35735            )),
35736            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35737                OPEN_DRONE_ID_LOCATION_DATA::default(),
35738            )),
35739            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35740                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35741            )),
35742            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35743                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35744            )),
35745            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35746                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35747            )),
35748            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35749                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35750            )),
35751            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35752                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35753            )),
35754            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35755            OPTICAL_FLOW_RAD_DATA::ID => {
35756                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35757            }
35758            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35759                ORBIT_EXECUTION_STATUS_DATA::default(),
35760            )),
35761            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35762            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35763                PARAM_EXT_REQUEST_LIST_DATA::default(),
35764            )),
35765            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35766                PARAM_EXT_REQUEST_READ_DATA::default(),
35767            )),
35768            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35769            PARAM_EXT_VALUE_DATA::ID => {
35770                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35771            }
35772            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35773            PARAM_REQUEST_LIST_DATA::ID => {
35774                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35775            }
35776            PARAM_REQUEST_READ_DATA::ID => {
35777                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35778            }
35779            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35780            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35781            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35782            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35783            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35784            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35785                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35786            )),
35787            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35788                POSITION_TARGET_LOCAL_NED_DATA::default(),
35789            )),
35790            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35791            PROTOCOL_VERSION_DATA::ID => {
35792                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35793            }
35794            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35795            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35796            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35797            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35798            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35799            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35800                RC_CHANNELS_OVERRIDE_DATA::default(),
35801            )),
35802            RC_CHANNELS_RAW_DATA::ID => {
35803                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35804            }
35805            RC_CHANNELS_SCALED_DATA::ID => {
35806                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35807            }
35808            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35809                REQUEST_DATA_STREAM_DATA::default(),
35810            )),
35811            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35812            RESOURCE_REQUEST_DATA::ID => {
35813                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35814            }
35815            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35816                RESPONSE_EVENT_ERROR_DATA::default(),
35817            )),
35818            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35819                SAFETY_ALLOWED_AREA_DATA::default(),
35820            )),
35821            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35822                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35823            )),
35824            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35825            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35826            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35827            SCALED_PRESSURE_DATA::ID => {
35828                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35829            }
35830            SCALED_PRESSURE2_DATA::ID => {
35831                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35832            }
35833            SCALED_PRESSURE3_DATA::ID => {
35834                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35835            }
35836            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35837            SERVO_OUTPUT_RAW_DATA::ID => {
35838                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35839            }
35840            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35841            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35842                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35843            )),
35844            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35845                SET_ATTITUDE_TARGET_DATA::default(),
35846            )),
35847            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35848                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35849            )),
35850            SET_HOME_POSITION_DATA::ID => {
35851                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35852            }
35853            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35854            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35855                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35856            )),
35857            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35858                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35859            )),
35860            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35861            SMART_BATTERY_INFO_DATA::ID => {
35862                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35863            }
35864            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35865            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35866                STORAGE_INFORMATION_DATA::default(),
35867            )),
35868            SUPPORTED_TUNES_DATA::ID => {
35869                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35870            }
35871            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35872            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35873            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35874            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35875            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35876            TERRAIN_REQUEST_DATA::ID => {
35877                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35878            }
35879            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35880            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35881                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35882            )),
35883            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35884                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35885                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35886                ))
35887            }
35888            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35889                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35890                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35891                ))
35892            }
35893            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35894            UAVCAN_NODE_INFO_DATA::ID => {
35895                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35896            }
35897            UAVCAN_NODE_STATUS_DATA::ID => {
35898                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35899            }
35900            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35901                UTM_GLOBAL_POSITION_DATA::default(),
35902            )),
35903            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35904            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35905            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35906            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35907                VICON_POSITION_ESTIMATE_DATA::default(),
35908            )),
35909            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35910                VIDEO_STREAM_INFORMATION_DATA::default(),
35911            )),
35912            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35913                VIDEO_STREAM_STATUS_DATA::default(),
35914            )),
35915            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35916                VISION_POSITION_ESTIMATE_DATA::default(),
35917            )),
35918            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35919                VISION_SPEED_ESTIMATE_DATA::default(),
35920            )),
35921            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35922            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35923            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35924            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35925            _ => None,
35926        }
35927    }
35928    #[cfg(feature = "arbitrary")]
35929    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35930        match id {
35931            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35932                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35933            )),
35934            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35935                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35936            )),
35937            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35938            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35939            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35940            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35941            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35942                ATTITUDE_QUATERNION_DATA::random(rng),
35943            )),
35944            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35945                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35946            )),
35947            ATTITUDE_TARGET_DATA::ID => {
35948                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35949            }
35950            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35951            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35952            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35953                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35954                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35955                ))
35956            }
35957            AUTOPILOT_VERSION_DATA::ID => {
35958                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35959            }
35960            AVAILABLE_MODES_DATA::ID => {
35961                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35962            }
35963            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35964                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35965            )),
35966            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35967            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35968            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35969            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35970                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35971            )),
35972            CAMERA_FOV_STATUS_DATA::ID => {
35973                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35974            }
35975            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35976                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35977            )),
35978            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35979                CAMERA_INFORMATION_DATA::random(rng),
35980            )),
35981            CAMERA_SETTINGS_DATA::ID => {
35982                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35983            }
35984            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35985                CAMERA_THERMAL_RANGE_DATA::random(rng),
35986            )),
35987            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35988                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35989            )),
35990            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35991                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35992            )),
35993            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35994            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35995            CAN_FILTER_MODIFY_DATA::ID => {
35996                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35997            }
35998            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35999            CELLULAR_CONFIG_DATA::ID => {
36000                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36001            }
36002            CELLULAR_STATUS_DATA::ID => {
36003                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36004            }
36005            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36006                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36007            )),
36008            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36009                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36010            )),
36011            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36012            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36013            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36014            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36015            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36016            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36017                COMPONENT_INFORMATION_DATA::random(rng),
36018            )),
36019            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36020                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36021            )),
36022            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36023                COMPONENT_METADATA_DATA::random(rng),
36024            )),
36025            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36026                CONTROL_SYSTEM_STATE_DATA::random(rng),
36027            )),
36028            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
36029                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
36030            )),
36031            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
36032                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
36033                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
36034                ))
36035            }
36036            CUBEPILOT_RAW_RC_DATA::ID => {
36037                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
36038            }
36039            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36040                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36041            )),
36042            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36043            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36044            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36045                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36046            )),
36047            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36048            DEBUG_FLOAT_ARRAY_DATA::ID => {
36049                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36050            }
36051            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36052            DISTANCE_SENSOR_DATA::ID => {
36053                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36054            }
36055            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36056            ENCAPSULATED_DATA_DATA::ID => {
36057                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36058            }
36059            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36060            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36061            ESTIMATOR_STATUS_DATA::ID => {
36062                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36063            }
36064            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36065            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36066                EXTENDED_SYS_STATE_DATA::random(rng),
36067            )),
36068            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36069            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36070                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36071            )),
36072            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36073                FLIGHT_INFORMATION_DATA::random(rng),
36074            )),
36075            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36076            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36077            GENERATOR_STATUS_DATA::ID => {
36078                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36079            }
36080            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36081                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36082            )),
36083            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36084                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36085            )),
36086            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36087                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36088            )),
36089            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36090                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36091            )),
36092            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36093                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36094            )),
36095            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36096                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36097                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36098                ))
36099            }
36100            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36101                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36102            )),
36103            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36104                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36105            )),
36106            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36107                GLOBAL_POSITION_INT_DATA::random(rng),
36108            )),
36109            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36110                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36111            )),
36112            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36113                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36114                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36115                ))
36116            }
36117            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36118            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36119            GPS_GLOBAL_ORIGIN_DATA::ID => {
36120                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36121            }
36122            GPS_INJECT_DATA_DATA::ID => {
36123                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36124            }
36125            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36126            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36127            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36128            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36129            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36130            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36131            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
36132            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36133                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
36134                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
36135                ))
36136            }
36137            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36138            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36139            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36140            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36141                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36142            )),
36143            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36144            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36145            HIL_OPTICAL_FLOW_DATA::ID => {
36146                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36147            }
36148            HIL_RC_INPUTS_RAW_DATA::ID => {
36149                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36150            }
36151            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36152            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36153            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36154                HIL_STATE_QUATERNION_DATA::random(rng),
36155            )),
36156            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36157            HYGROMETER_SENSOR_DATA::ID => {
36158                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36159            }
36160            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36161                ILLUMINATOR_STATUS_DATA::random(rng),
36162            )),
36163            ISBD_LINK_STATUS_DATA::ID => {
36164                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36165            }
36166            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36167            LINK_NODE_STATUS_DATA::ID => {
36168                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36169            }
36170            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36171                LOCAL_POSITION_NED_DATA::random(rng),
36172            )),
36173            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36174                LOCAL_POSITION_NED_COV_DATA::random(rng),
36175            )),
36176            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36177                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36178                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36179                ))
36180            }
36181            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36182            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36183            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36184                LOGGING_DATA_ACKED_DATA::random(rng),
36185            )),
36186            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36187            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36188            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36189            LOG_REQUEST_DATA_DATA::ID => {
36190                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36191            }
36192            LOG_REQUEST_END_DATA::ID => {
36193                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36194            }
36195            LOG_REQUEST_LIST_DATA::ID => {
36196                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36197            }
36198            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36199            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36200            MANUAL_SETPOINT_DATA::ID => {
36201                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36202            }
36203            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36204            MESSAGE_INTERVAL_DATA::ID => {
36205                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36206            }
36207            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36208            MISSION_CLEAR_ALL_DATA::ID => {
36209                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36210            }
36211            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36212            MISSION_CURRENT_DATA::ID => {
36213                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36214            }
36215            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36216            MISSION_ITEM_INT_DATA::ID => {
36217                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36218            }
36219            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36220                MISSION_ITEM_REACHED_DATA::random(rng),
36221            )),
36222            MISSION_REQUEST_DATA::ID => {
36223                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36224            }
36225            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36226                MISSION_REQUEST_INT_DATA::random(rng),
36227            )),
36228            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36229                MISSION_REQUEST_LIST_DATA::random(rng),
36230            )),
36231            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36232                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36233            )),
36234            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36235                MISSION_SET_CURRENT_DATA::random(rng),
36236            )),
36237            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36238                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36239            )),
36240            MOUNT_ORIENTATION_DATA::ID => {
36241                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36242            }
36243            NAMED_VALUE_FLOAT_DATA::ID => {
36244                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36245            }
36246            NAMED_VALUE_INT_DATA::ID => {
36247                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36248            }
36249            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36250                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36251            )),
36252            OBSTACLE_DISTANCE_DATA::ID => {
36253                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36254            }
36255            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36256            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36257                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36258            )),
36259            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36260                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36261            )),
36262            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36263                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36264            )),
36265            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36266                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36267            )),
36268            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36269                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36270            )),
36271            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36272                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36273            )),
36274            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36275                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36276            )),
36277            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36278                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36279            )),
36280            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36281                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36282            )),
36283            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36284                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36285            )),
36286            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36287            OPTICAL_FLOW_RAD_DATA::ID => {
36288                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36289            }
36290            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36291                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36292            )),
36293            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36294            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36295                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36296            )),
36297            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36298                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36299            )),
36300            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36301            PARAM_EXT_VALUE_DATA::ID => {
36302                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36303            }
36304            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36305            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36306                PARAM_REQUEST_LIST_DATA::random(rng),
36307            )),
36308            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36309                PARAM_REQUEST_READ_DATA::random(rng),
36310            )),
36311            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36312            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36313            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36314            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36315            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36316            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36317                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36318            )),
36319            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36320                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36321            )),
36322            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36323            PROTOCOL_VERSION_DATA::ID => {
36324                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36325            }
36326            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36327            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36328            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36329            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36330            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36331            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36332                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36333            )),
36334            RC_CHANNELS_RAW_DATA::ID => {
36335                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36336            }
36337            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36338                RC_CHANNELS_SCALED_DATA::random(rng),
36339            )),
36340            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36341                REQUEST_DATA_STREAM_DATA::random(rng),
36342            )),
36343            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36344            RESOURCE_REQUEST_DATA::ID => {
36345                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36346            }
36347            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36348                RESPONSE_EVENT_ERROR_DATA::random(rng),
36349            )),
36350            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36351                SAFETY_ALLOWED_AREA_DATA::random(rng),
36352            )),
36353            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36354                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36355            )),
36356            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36357            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36358            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36359            SCALED_PRESSURE_DATA::ID => {
36360                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36361            }
36362            SCALED_PRESSURE2_DATA::ID => {
36363                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36364            }
36365            SCALED_PRESSURE3_DATA::ID => {
36366                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36367            }
36368            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36369            SERVO_OUTPUT_RAW_DATA::ID => {
36370                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36371            }
36372            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36373            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36374                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36375            )),
36376            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36377                SET_ATTITUDE_TARGET_DATA::random(rng),
36378            )),
36379            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36380                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36381            )),
36382            SET_HOME_POSITION_DATA::ID => {
36383                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36384            }
36385            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36386            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36387                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36388            )),
36389            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36390                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36391            )),
36392            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36393            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36394                SMART_BATTERY_INFO_DATA::random(rng),
36395            )),
36396            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36397            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36398                STORAGE_INFORMATION_DATA::random(rng),
36399            )),
36400            SUPPORTED_TUNES_DATA::ID => {
36401                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36402            }
36403            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36404            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36405            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36406            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36407            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36408            TERRAIN_REQUEST_DATA::ID => {
36409                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36410            }
36411            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36412            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36413                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36414            )),
36415            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36416                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36417                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36418                ))
36419            }
36420            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36421                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36422                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36423                ))
36424            }
36425            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36426            UAVCAN_NODE_INFO_DATA::ID => {
36427                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36428            }
36429            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36430                UAVCAN_NODE_STATUS_DATA::random(rng),
36431            )),
36432            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36433                UTM_GLOBAL_POSITION_DATA::random(rng),
36434            )),
36435            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36436            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36437            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36438            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36439                VICON_POSITION_ESTIMATE_DATA::random(rng),
36440            )),
36441            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36442                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36443            )),
36444            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36445                VIDEO_STREAM_STATUS_DATA::random(rng),
36446            )),
36447            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36448                VISION_POSITION_ESTIMATE_DATA::random(rng),
36449            )),
36450            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36451                VISION_SPEED_ESTIMATE_DATA::random(rng),
36452            )),
36453            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36454            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36455            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36456            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36457            _ => None,
36458        }
36459    }
36460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36461        match self {
36462            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36463            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36464            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36465            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36466            Self::ALTITUDE(body) => body.ser(version, bytes),
36467            Self::ATTITUDE(body) => body.ser(version, bytes),
36468            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36469            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36470            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36471            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36472            Self::AUTH_KEY(body) => body.ser(version, bytes),
36473            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36474            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36475            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36476            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36477            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36478            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36479            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36480            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36481            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36482            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36483            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36484            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36485            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36486            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36487            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36488            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36489            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36490            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36491            Self::CAN_FRAME(body) => body.ser(version, bytes),
36492            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36493            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36494            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36495            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36496            Self::COLLISION(body) => body.ser(version, bytes),
36497            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36498            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36499            Self::COMMAND_INT(body) => body.ser(version, bytes),
36500            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36501            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36502            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36503            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36504            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36505            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
36506            Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
36507            Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
36508            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36509            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36510            Self::DATA_STREAM(body) => body.ser(version, bytes),
36511            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36512            Self::DEBUG(body) => body.ser(version, bytes),
36513            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36514            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36515            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36516            Self::EFI_STATUS(body) => body.ser(version, bytes),
36517            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36518            Self::ESC_INFO(body) => body.ser(version, bytes),
36519            Self::ESC_STATUS(body) => body.ser(version, bytes),
36520            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36521            Self::EVENT(body) => body.ser(version, bytes),
36522            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36523            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36524            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36525            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36526            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36527            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36528            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36529            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36530            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36531            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36532            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36533            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36534            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36535            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36536            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36537            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36538            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36539            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36540            Self::GPS2_RAW(body) => body.ser(version, bytes),
36541            Self::GPS2_RTK(body) => body.ser(version, bytes),
36542            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36543            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36544            Self::GPS_INPUT(body) => body.ser(version, bytes),
36545            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36546            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36547            Self::GPS_RTK(body) => body.ser(version, bytes),
36548            Self::GPS_STATUS(body) => body.ser(version, bytes),
36549            Self::HEARTBEAT(body) => body.ser(version, bytes),
36550            Self::HERELINK_TELEM(body) => body.ser(version, bytes),
36551            Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36552            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36553            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36554            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36555            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36556            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36557            Self::HIL_GPS(body) => body.ser(version, bytes),
36558            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36559            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36560            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36561            Self::HIL_STATE(body) => body.ser(version, bytes),
36562            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36563            Self::HOME_POSITION(body) => body.ser(version, bytes),
36564            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36565            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36566            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36567            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36568            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36569            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36570            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36571            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36572            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36573            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36574            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36575            Self::LOG_DATA(body) => body.ser(version, bytes),
36576            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36577            Self::LOG_ERASE(body) => body.ser(version, bytes),
36578            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36579            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36580            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36581            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36582            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36583            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36584            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36585            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36586            Self::MISSION_ACK(body) => body.ser(version, bytes),
36587            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36588            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36589            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36590            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36591            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36592            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36593            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36594            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36595            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36596            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36597            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36598            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36599            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36600            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36601            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36602            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36603            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36604            Self::ODOMETRY(body) => body.ser(version, bytes),
36605            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36606            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36607            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36608            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36609            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36610            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36611            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36612            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36613            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36614            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36615            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36616            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36617            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36618            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36619            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36620            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36621            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36622            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36623            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36624            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36625            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36626            Self::PARAM_SET(body) => body.ser(version, bytes),
36627            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36628            Self::PING(body) => body.ser(version, bytes),
36629            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36630            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36631            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36632            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36633            Self::POWER_STATUS(body) => body.ser(version, bytes),
36634            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36635            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36636            Self::RAW_IMU(body) => body.ser(version, bytes),
36637            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36638            Self::RAW_RPM(body) => body.ser(version, bytes),
36639            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36640            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36641            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36642            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36643            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36644            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36645            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36646            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36647            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36648            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36649            Self::SCALED_IMU(body) => body.ser(version, bytes),
36650            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36651            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36652            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36653            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36654            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36655            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36656            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36657            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36658            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36659            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36660            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36661            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36662            Self::SET_MODE(body) => body.ser(version, bytes),
36663            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36664            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36665            Self::SIM_STATE(body) => body.ser(version, bytes),
36666            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36667            Self::STATUSTEXT(body) => body.ser(version, bytes),
36668            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36669            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36670            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36671            Self::SYS_STATUS(body) => body.ser(version, bytes),
36672            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36673            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36674            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36675            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36676            Self::TIMESYNC(body) => body.ser(version, bytes),
36677            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36678            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36679            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36680            Self::TUNNEL(body) => body.ser(version, bytes),
36681            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36682            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36683            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36684            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36685            Self::VFR_HUD(body) => body.ser(version, bytes),
36686            Self::VIBRATION(body) => body.ser(version, bytes),
36687            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36688            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36689            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36690            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36691            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36692            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36693            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36694            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36695            Self::WIND_COV(body) => body.ser(version, bytes),
36696        }
36697    }
36698    fn extra_crc(id: u32) -> u8 {
36699        match id {
36700            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36701            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36702            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36703            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36704            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36705            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36706            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36707            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36708            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36709            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36710            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36711            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36712                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36713            }
36714            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36715            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36716            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36717            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36718            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36719            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36720            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36721            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36722            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36723            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36724            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36725            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36726            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36727            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36728            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36729            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36730            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36731            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36732            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36733            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36734            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36735            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36736            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36737            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36738            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36739            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36740            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36741            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36742            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36743            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36744            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36745            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
36746                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
36747            }
36748            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
36749                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
36750            }
36751            CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
36752            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36753            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36754            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36755            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36756            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36757            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36758            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36759            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36760            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36761            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36762            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36763            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36764            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36765            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36766            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36767            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36768            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36769            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36770            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36771            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36772            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36773            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36774            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36775            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36776            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36777            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36778            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36779                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36780            }
36781            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36782            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36783            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36784            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36785            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36786                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36787            }
36788            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36789            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36790            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36791            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36792            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36793            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36794            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36795            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36796            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36797            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36798            HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
36799            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36800                HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
36801            }
36802            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36803            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36804            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36805            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36806            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36807            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36808            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36809            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36810            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36811            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36812            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36813            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36814            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36815            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36816            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36817            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36818            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36819            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36820            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36821            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36822                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36823            }
36824            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36825            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36826            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36827            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36828            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36829            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36830            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36831            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36832            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36833            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36834            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36835            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36836            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36837            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36838            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36839            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36840            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36841            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36842            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36843            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36844            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36845            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36846            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36847            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36848            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36849            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36850            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36851            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36852            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36853            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36854            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36855            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36856            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36857            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36858            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36859            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36860            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36861            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36862            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36863            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36864            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36865            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36866            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36867            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36868            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36869            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36870            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36871            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36872            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36873            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36874            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36875            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36876            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36877            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36878            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36879            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36880            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36881            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36882            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36883            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36884            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36885            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36886            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36887            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36888            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36889            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36890            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36891            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36892            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36893            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36894            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36895            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36896            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36897            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36898            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36899            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36900            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36901            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36902            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36903            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36904            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36905            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36906            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36907            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36908            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36909            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36910            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36911            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36912            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36913            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36914            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36915            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36916                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36917            }
36918            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36919            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36920            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36921            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36922            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36923            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36924            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36925            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36926            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36927            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36928            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36929            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36930            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36931            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36932            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36933                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36934            }
36935            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36936                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36937            }
36938            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36939            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36940            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36941            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36942            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36943            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36944            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36945            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36946            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36947            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36948            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36949            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36950            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36951            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36952            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36953            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36954            _ => 0,
36955        }
36956    }
36957    fn target_system_id(&self) -> Option<u8> {
36958        match self {
36959            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36960            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36961            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36962            Self::CAN_FRAME(inner) => Some(inner.target_system),
36963            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36964            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36965            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36966            Self::COMMAND_INT(inner) => Some(inner.target_system),
36967            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36968            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
36969            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
36970            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36971            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36972            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36973            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36974            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36975            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36976            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36977            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36978            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36979            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36980            Self::LOG_ERASE(inner) => Some(inner.target_system),
36981            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36982            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36983            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36984            Self::MISSION_ACK(inner) => Some(inner.target_system),
36985            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36986            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36987            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36988            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36989            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36990            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36991            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36992            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36993            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36994            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36995            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36996            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36997            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36998            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36999            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37000            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37001            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37002            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37003            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37004            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37005            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37006            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37007            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37008            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37009            Self::PARAM_SET(inner) => Some(inner.target_system),
37010            Self::PING(inner) => Some(inner.target_system),
37011            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37012            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37013            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37014            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37015            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37016            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37017            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37018            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37019            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37020            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37021            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37022            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37023            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37024            Self::SET_MODE(inner) => Some(inner.target_system),
37025            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37026            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37027            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37028            Self::TIMESYNC(inner) => Some(inner.target_system),
37029            Self::TUNNEL(inner) => Some(inner.target_system),
37030            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37031            _ => None,
37032        }
37033    }
37034    fn target_component_id(&self) -> Option<u8> {
37035        match self {
37036            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37037            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37038            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37039            Self::CAN_FRAME(inner) => Some(inner.target_component),
37040            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37041            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37042            Self::COMMAND_INT(inner) => Some(inner.target_component),
37043            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37044            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
37045            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
37046            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37047            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37048            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37049            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37050            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37051            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37052            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37053            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37054            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37055            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37056            Self::LOG_ERASE(inner) => Some(inner.target_component),
37057            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37058            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37059            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37060            Self::MISSION_ACK(inner) => Some(inner.target_component),
37061            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37062            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37063            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37064            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37065            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37066            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37067            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37068            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37069            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37070            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37071            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37072            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37073            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37074            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37075            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37076            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37077            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37078            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37079            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37080            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37081            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37082            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37083            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37084            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37085            Self::PARAM_SET(inner) => Some(inner.target_component),
37086            Self::PING(inner) => Some(inner.target_component),
37087            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37088            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37089            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37090            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37091            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37092            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37093            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37094            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37095            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37096            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37097            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37098            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37099            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37100            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37101            Self::TIMESYNC(inner) => Some(inner.target_component),
37102            Self::TUNNEL(inner) => Some(inner.target_component),
37103            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37104            _ => None,
37105        }
37106    }
37107}